]> Dogcows Code - chaz/tar/commitdiff
(dump_file0): Original ctime cannot be used as a directory change indicator if -...
authorSergey Poznyakoff <gray@gnu.org.ua>
Fri, 18 May 2007 08:22:21 +0000 (08:22 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Fri, 18 May 2007 08:22:21 +0000 (08:22 +0000)
src/create.c

index 4ff30542ba8fb27e0d7c268ce09c0f8163165f40..eaaf8a75af5b3894f686e9b000395864b379abc8 100644 (file)
@@ -1195,7 +1195,6 @@ dump_dir0 (char *directory,
 
            /* Now output all the files in the directory.  */
            /* FIXME: Should speed this up by cd-ing into the dir.  */
-
            for (entry = directory; (entry_len = strlen (entry)) != 0;
                 entry += entry_len + 1)
              {
@@ -1646,7 +1645,10 @@ dump_file0 (struct tar_stat_info *st, const char *p,
 
       if (ok)
        {
-         if (timespec_cmp (get_stat_ctime (&final_stat), original_ctime) != 0
+         if ((timespec_cmp (get_stat_ctime (&final_stat), original_ctime) != 0
+              /* Original ctime will change if the file is a directory and
+                 --remove-files is given */
+              && !(remove_files_option && is_dir))
              || original_size < final_stat.st_size)
            {
              WARN ((0, 0, _("%s: file changed as we read it"),
This page took 0.029357 seconds and 4 git commands to generate.