r13535: Fix #2353 based on a patch by William Jojo.
authorJeremy Allison <jra@samba.org>
Thu, 16 Feb 2006 23:08:12 +0000 (23:08 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:10:11 +0000 (11:10 -0500)
Jeremy.

source/client/clitar.c

index c15d24d619a752e8dace2602d00df76f5a2b6b61..cd0ce27eb5fb181e31d7d2f2e01080ef7cda0640 100644 (file)
@@ -1698,8 +1698,8 @@ int tar_parseargs(int argc, char *argv[], const char *Optarg, int Optind)
                        return 0;
                }
                newOptind++;
-               Optind++;
-               if (! read_inclusion_file(argv[Optind])) {
+               /* Optind points at the tar output file, Optind+1 at the inclusion file. */
+               if (! read_inclusion_file(argv[Optind+1])) {
                        return 0;
                }
        } else if (Optind+1<argc && !tar_re_search) { /* For backwards compatibility */
@@ -1738,7 +1738,8 @@ int tar_parseargs(int argc, char *argv[], const char *Optarg, int Optind)
                newOptind += clipn;
        }
 
-       if (Optind+1<argc && tar_re_search) {  /* Doing regular expression seaches */
+       if (Optind+1<argc && tar_re_search && tar_clipfl != 'F') {
+               /* Doing regular expression seaches not from an inclusion file. */
                clipn=argc-Optind-1;
                cliplist=argv+Optind+1;
                newOptind += clipn;