From: Sergey Poznyakoff Date: Tue, 23 Jun 2009 13:52:33 +0000 (+0300) Subject: Minor fix. X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=01c4475b17bf80cc04e6927b809190f2956e2f89;p=chaz%2Ftar Minor fix. * src/extract.c (file_newer_p): Do not report error on ENOENT --- diff --git a/src/extract.c b/src/extract.c index 40d5528..63f3525 100644 --- a/src/extract.c +++ b/src/extract.c @@ -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)