]> Dogcows Code - chaz/tar/commitdiff
(namelist_match, excluded_name): Do not match subfiles of a directory
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 29 Oct 2000 05:30:02 +0000 (05:30 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 29 Oct 2000 05:30:02 +0000 (05:30 +0000)
if --no-recursion is specified.

src/names.c

index 5bc075be3dd18a1820385c072995c3e437e80207..ebcd3e722d3c59fced2a73240cf6e8e48a5d670f 100644 (file)
@@ -502,7 +502,7 @@ namelist_match (char const *path, size_t length)
        continue;
 
       if (p->regexp
-         ? fnmatch (p->name, path, FNM_LEADING_DIR) == 0
+         ? fnmatch (p->name, path, recursion_option) == 0
          : (p->length <= length
             && (path[p->length] == '\0' || path[p->length] == '/')
             && memcmp (path, p->name, p->length) == 0))
@@ -871,7 +871,7 @@ excluded_name (char const *name)
   name += FILESYSTEM_PREFIX_LEN (name);
 
   if (excluded_filename (excluded_with_slash, name,
-                        FNM_FILE_NAME | FNM_LEADING_DIR))
+                        FNM_FILE_NAME | recursion_option))
     return 1;
 
   for (p = name; *p; p++)
This page took 0.023498 seconds and 4 git commands to generate.