]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Passing -C '' to tar is meaningless; complain about it.
authorColin Percival <cperciva@daemonology.net>
Tue, 16 Aug 2011 04:27:03 +0000 (00:27 -0400)
committerColin Percival <cperciva@daemonology.net>
Tue, 16 Aug 2011 04:27:03 +0000 (00:27 -0400)
Via: Tarsnap

SVN-Revision: 3609

tar/write.c

index ab3c1532c0e5f61fa43cd0a97c233830bf59ab66..ff23e768a50e32e0a760b5b59a89eb0973990a68 100644 (file)
@@ -461,6 +461,12 @@ write_archive(struct archive *a, struct bsdtar *bsdtar)
                                        bsdtar->return_value = 1;
                                        goto cleanup;
                                }
+                               if (*arg == '\0') {
+                                       bsdtar_warnc(bsdtar, 0,
+                                           "Meaningless argument for -C: ''");
+                                       bsdtar->return_value = 1;
+                                       goto cleanup;
+                               }
                        }
                        set_chdir(bsdtar, arg);
                } else {