diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-05-20 00:40:08 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-05-20 00:40:08 +0000 |
commit | 8ea7d8cdaf4a03cdc06abc8b752b589271140a88 (patch) | |
tree | 955fc9545f490ca39f0c24629316b7d328612802 /archival | |
parent | 330fd2b5767110f29544131d4c72c77e0506b6df (diff) |
First pass at fixing tar segfault, and more portability updates.
-Erik
Diffstat (limited to 'archival')
-rw-r--r-- | archival/tar.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/archival/tar.c b/archival/tar.c index 6784d80ff..c5aad45d6 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -185,7 +185,7 @@ extern int tar_main(int argc, char **argv) usage(tar_usage); /* Parse any options */ - while (--argc > 0 && **(++argv) == '-') { + while (--argc > 0 && strspn(*(++argv), "-cxt") >0 ) { stopIt=FALSE; while (stopIt==FALSE && *(++(*argv))) { switch (**argv) { @@ -265,7 +265,8 @@ extern int tar_main(int argc, char **argv) #else exit(writeTarFile(tarName, tostdoutFlag, verboseFlag, argc, argv, excludeList)); #endif - } else { + } + if (listFlag == TRUE || extractFlag == TRUE) { exit(readTarFile(tarName, extractFlag, listFlag, tostdoutFlag, verboseFlag, excludeList)); } |