* src/tar.c (NS_PRECISION_FORMAT_MASK): New macro.
(tar_timespec_cmp): New function. Wrapper over timespec_cmp using the timespec precision provided by the current archive format. * src/common.h (tar_timespec_cmp): New declaration. * src/compare.c (diff_file): Use tar_timespec_cmp. * src/extract.c (file_newer_p): Likewise. * src/update.c (update_archive): Likewise. * tests/truncate.at: Reverted changes * tests/update.at: Reverted changes
This commit is contained in:
@@ -469,7 +469,7 @@ file_newer_p (const char *file_name, struct tar_stat_info *tar_stat)
|
||||
return errno != ENOENT;
|
||||
}
|
||||
if (!S_ISDIR (st.st_mode)
|
||||
&& timespec_cmp (tar_stat->mtime, get_stat_mtime (&st)) <= 0)
|
||||
&& tar_timespec_cmp (tar_stat->mtime, get_stat_mtime (&st)) <= 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user