]> Dogcows Code - chaz/tar/commitdiff
(try_purge_directory): Initialize struct st. Fix condition for selecting candidates...
authorSergey Poznyakoff <gray@gnu.org.ua>
Fri, 8 Sep 2006 16:45:41 +0000 (16:45 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Fri, 8 Sep 2006 16:45:41 +0000 (16:45 +0000)
src/incremen.c

index 7f04f80b457eff53cbbdd2d6bda67a60920fa0e2..6cd8efb8b2ae662ce2fe058d0b3ae6af34b6293b 100644 (file)
@@ -1381,22 +1381,23 @@ try_purge_directory (char const *directory_name)
        free (p);
       p = new_name (directory_name, cur);
 
-      if (!(entry = dumpdir_locate (current_stat_info.dumpdir, cur))
-         || (*entry == 'D' && S_ISDIR (st.st_mode))
-         || (*entry == 'Y' && !S_ISDIR (st.st_mode)))
+      if (deref_stat (false, p, &st))
        {
-         if (deref_stat (false, p, &st))
+         if (errno != ENOENT) /* FIXME: Maybe keep a list of renamed
+                                 dirs and check it here? */
            {
-             if (errno != ENOENT) /* FIXME: Maybe keep a list of renamed
-                                     dirs and check it here? */
-               {
-                 stat_diag (p);
-                 WARN ((0, 0, _("%s: Not purging directory: unable to stat"),
-                        quotearg_colon (p)));
-               }
-             continue;
+             stat_diag (p);
+             WARN ((0, 0, _("%s: Not purging directory: unable to stat"),
+                    quotearg_colon (p)));
            }
-         else if (one_file_system_option && st.st_dev != root_device)
+         continue;
+       }
+
+      if (!(entry = dumpdir_locate (current_stat_info.dumpdir, cur))
+         || (*entry == 'D' && !S_ISDIR (st.st_mode))
+         || (*entry == 'Y' && S_ISDIR (st.st_mode)))
+       {
+         if (one_file_system_option && st.st_dev != root_device)
            {
              WARN ((0, 0,
                     _("%s: directory is on a different device: not purging"),
This page took 0.027069 seconds and 4 git commands to generate.