Fix tarball creation. In an attempt to accomodate the whiners
authorErik Andersen <andersen@codepoet.org>
Fri, 28 Apr 2000 22:32:13 +0000 (22:32 -0000)
committerErik Andersen <andersen@codepoet.org>
Fri, 28 Apr 2000 22:32:13 +0000 (22:32 -0000)
that wanted "tar cf foo.tar foo" (i.e. no "-" before options)
I broke creation of tarballs.  Now fixed.
 -Erik

archival/tar.c
tar.c

index e205763dbfc4108c403a7804ed6dbd4027d0f3f1..c82e51fe97fd98a6d5500a0cbdc3df91fb0cf763 100644 (file)
@@ -183,7 +183,7 @@ extern int tar_main(int argc, char **argv)
                usage(tar_usage);
 
        /* Parse any options */
-       while (--argc > 0 && (**(++argv) != '\0')) {
+       while (--argc > 0 && **(++argv) == '-') {
                stopIt=FALSE;
                while (stopIt==FALSE && *(++(*argv))) {
                        switch (**argv) {
diff --git a/tar.c b/tar.c
index e205763dbfc4108c403a7804ed6dbd4027d0f3f1..c82e51fe97fd98a6d5500a0cbdc3df91fb0cf763 100644 (file)
--- a/tar.c
+++ b/tar.c
@@ -183,7 +183,7 @@ extern int tar_main(int argc, char **argv)
                usage(tar_usage);
 
        /* Parse any options */
-       while (--argc > 0 && (**(++argv) != '\0')) {
+       while (--argc > 0 && **(++argv) == '-') {
                stopIt=FALSE;
                while (stopIt==FALSE && *(++(*argv))) {
                        switch (**argv) {