]> Dogcows Code - chaz/tar/blobdiff - src/misc.c
Fix extraction from concatenated incremental archives.
[chaz/tar] / src / misc.c
index e92c8aa830e36fe2fca6cd25aeaf9f107d7b6bac..d263c0785da5503be29f40c02c45bd02e28372f2 100644 (file)
@@ -288,7 +288,8 @@ normalize_filename (int cdidx, const char *name)
          this following approach may lead to situations where the same
          file or directory is processed twice under different absolute
          paths without that duplication being detected.  Perhaps we
          this following approach may lead to situations where the same
          file or directory is processed twice under different absolute
          paths without that duplication being detected.  Perhaps we
-         should use dev+ino pairs instead of names?  */
+         should use dev+ino pairs instead of names?  (See listed03.at for
+         a related test case.) */
       const char *cdpath = tar_getcdpath (cdidx);
       size_t copylen;
       bool need_separator;
       const char *cdpath = tar_getcdpath (cdidx);
       size_t copylen;
       bool need_separator;
@@ -585,7 +586,12 @@ safer_rmdir (const char *file_name)
       return -1;
     }
 
       return -1;
     }
 
-  return unlinkat (chdir_fd, file_name, AT_REMOVEDIR);
+  if (unlinkat (chdir_fd, file_name, AT_REMOVEDIR) == 0)
+    {
+      remove_delayed_set_stat (file_name);
+      return 0;
+    }
+  return -1;
 }
 
 /* Remove FILE_NAME, returning 1 on success.  If FILE_NAME is a directory,
 }
 
 /* Remove FILE_NAME, returning 1 on success.  If FILE_NAME is a directory,
@@ -1239,7 +1245,7 @@ tar_savedir (const char *name, int must_exist)
       open_error (name);
     }
   else if (! ((dir = fdopendir (fd))
       open_error (name);
     }
   else if (! ((dir = fdopendir (fd))
-             && (ret = streamsavedir (dir))))
+             && (ret = streamsavedir (dir, savedir_sort_order))))
     savedir_error (name);
 
   if (dir ? closedir (dir) != 0 : 0 <= fd && close (fd) != 0)
     savedir_error (name);
 
   if (dir ? closedir (dir) != 0 : 0 <= fd && close (fd) != 0)
This page took 0.025337 seconds and 4 git commands to generate.