]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(copy_internal): Compare time stamps with subsecond resolution if available.
authorJim Meyering <jim@meyering.net>
Sun, 2 Aug 1998 16:23:28 +0000 (16:23 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 2 Aug 1998 16:23:28 +0000 (16:23 +0000)
src/copy.c

index cf9f1b2591d3df1ff94e86c044077813ba596fdb..3be9d38257649c84c02a9a62d2452f70d7deddcc 100644 (file)
@@ -491,7 +491,7 @@ copy_internal (const char *src_path, const char *dst_path,
                  return 1;
                }
 
-             if (x->update && src_sb.st_mtime <= dst_sb.st_mtime)
+             if (x->update && MTIME_CMP (src_sb, dst_sb) <= 0)
                return 0;
            }
 
@@ -818,6 +818,10 @@ copy_internal (const char *src_path, const char *dst_path,
     {
       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;