summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cp.c b/src/cp.c
index f3c239073..ef73da2e1 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -233,6 +233,10 @@ re_protect (const char *const_dst_path, int src_offset,
{
struct utimbuf utb;
+ /* There's currently no interface to set file timestamps with
+ better than 1-second resolution, so discard any fractional
+ part of the source timestamp. */
+
utb.actime = src_sb.st_atime;
utb.modtime = src_sb.st_mtime;