]> Dogcows Code - chaz/tar/commitdiff
Minor fix.
authorSergey Poznyakoff <gray@gnu.org.ua>
Tue, 23 Jun 2009 13:52:33 +0000 (16:52 +0300)
committerSergey Poznyakoff <gray@gnu.org.ua>
Tue, 23 Jun 2009 13:52:33 +0000 (16:52 +0300)
* src/extract.c (file_newer_p): Do not report error on ENOENT

src/extract.c

index 40d55282ff4275d4c44586bcad5ec8fce2864b49..63f3525915022558319eacbe006df92107ba09be 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)
This page took 0.02778 seconds and 4 git commands to generate.