]> Dogcows Code - chaz/tar/blobdiff - src/extract.c
Fix backup handling and restoring file modes of existing directories
[chaz/tar] / src / extract.c
index 40d55282ff4275d4c44586bcad5ec8fce2864b49..5361506aedb26dea7c3fa699d3602c1eb30bcb7c 100644 (file)
@@ -486,9 +486,13 @@ file_newer_p (const char *file_name, struct tar_stat_info *tar_stat)
 
   if (stat (file_name, &st))
     {
-      stat_warn (file_name);
-      /* Be on the safe side: if the file does exist assume it is newer */
-      return errno != ENOENT;
+      if (errno != ENOENT)
+       {
+         stat_warn (file_name);
+         /* Be on the safe side: if the file does exist assume it is newer */
+         return true;
+       }
+      return false;
     }
   if (!S_ISDIR (st.st_mode)
       && tar_timespec_cmp (tar_stat->mtime, get_stat_mtime (&st)) <= 0)
@@ -678,6 +682,7 @@ extract_dir (char *file_name, int typeflag)
                }
              if (S_ISDIR (st.st_mode))
                {
+                 status = 0;
                  mode = st.st_mode;
                  break;
                }
This page took 0.024634 seconds and 4 git commands to generate.