Minor fix.
* src/extract.c (file_newer_p): Do not report error on ENOENT
This commit is contained in:
@@ -485,10 +485,14 @@ file_newer_p (const char *file_name, struct tar_stat_info *tar_stat)
|
||||
struct stat st;
|
||||
|
||||
if (stat (file_name, &st))
|
||||
{
|
||||
if (errno != ENOENT)
|
||||
{
|
||||
stat_warn (file_name);
|
||||
/* Be on the safe side: if the file does exist assume it is newer */
|
||||
return errno != ENOENT;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!S_ISDIR (st.st_mode)
|
||||
&& tar_timespec_cmp (tar_stat->mtime, get_stat_mtime (&st)) <= 0)
|
||||
|
||||
Reference in New Issue
Block a user