]> Dogcows Code - chaz/tar/commitdiff
(dump_dir0): Move checks for exclude tags to
authorSergey Poznyakoff <gray@gnu.org.ua>
Thu, 7 Dec 2006 14:33:42 +0000 (14:33 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Thu, 7 Dec 2006 14:33:42 +0000 (14:33 +0000)
dump_file0.
(dump_dir): Move calls to ensure_slash to dump_file0

src/create.c

index 641603afef5dd5b8e97434269a0a25d97c2fbfd0..23e9efdbd302f8537c872d4561b69280ae04fa54 100644 (file)
@@ -1173,20 +1173,7 @@ dump_dir0 (char *directory,
               quotearg_colon (st->orig_file_name)));
       return;
     }
-
-  if (exclude_caches_option
-      && check_cache_directory(st->orig_file_name))
-    {
-      if (verbose_option)
-       WARN ((0, 0,
-              _("%s: contains a cache directory tag; not dumped"),
-              quotearg_colon (st->orig_file_name)));
-      return;
-    }
-
-  if (check_exclude_tags (st->orig_file_name))
-    return;
-
+  
   {
     char const *entry;
     size_t entry_len;
@@ -1237,9 +1224,6 @@ dump_dir (int fd, struct tar_stat_info *st, int top_level, dev_t parent_device)
       return false;
     }
 
-  ensure_slash (&st->orig_file_name);
-  ensure_slash (&st->file_name);
-
   dump_dir0 (directory, st, top_level, parent_device);
 
   free (directory);
@@ -1560,6 +1544,22 @@ dump_file0 (struct tar_stat_info *st, const char *p,
 
       if (is_dir)
        {
+         ensure_slash (&st->orig_file_name);
+         ensure_slash (&st->file_name);
+
+         if (exclude_caches_option
+             && check_cache_directory (st->orig_file_name))
+           {
+             if (verbose_option)
+               WARN ((0, 0,
+                      _("%s: contains a cache directory tag; not dumped"),
+                      quotearg_colon (st->orig_file_name)));
+             return;
+           }
+         
+         if (check_exclude_tags (st->orig_file_name))
+           return;
+
          ok = dump_dir (fd, st, top_level, parent_device);
 
          /* dump_dir consumes FD if successful.  */
This page took 0.029854 seconds and 4 git commands to generate.