GNOME Bugzilla – Bug 779648
File copy rounds timestamps
Last modified: 2017-03-10 22:26:27 UTC
Dear Maintainer, when I copy files or directories within Meld, the copies often get a slightly different time stamp (difference up to 1 micro second). I wouldn't have noticed this, if the "younger" files/dirs were sometimes not marked accordingly. Example: 1. Start with a directory src/ that contains some files "file*", empty dirs "empty*" and non-empty dirs "non-empty*". "ls --full-time" shows ... src/ 2017-03-05 15:33:23.243862000 +0100 empty+000ns 2017-03-05 15:33:23.243862044 +0100 empty+044ns 2017-03-05 15:30:58.417297176 +0100 empty+176ns 2017-03-05 15:10:56.020244755 +0100 empty+755ns 2017-03-05 15:39:52.319551913 +0100 empty+913ns 2017-03-05 12:56:09.036606000 +0100 file+000ns 2017-03-05 12:56:09.036606060 +0100 file+060ns 2017-03-05 15:24:37.712274516 +0100 file+516ns 2017-03-05 12:57:06.357629994 +0100 file+994ns 2017-03-05 17:01:26.648818000 +0100 non-empty+000ns 2017-03-05 17:01:26.648818000 +0100 non-empty+000ns/file 2017-03-05 17:01:26.648818167 +0100 non-empty+167ns 2017-03-05 17:01:26.648818167 +0100 non-empty+167ns/file 2. Compare src/ with an empty directory dest/; then copy src/ within Meld to dest/. The time stamps within dest/ are shown below (with comparison to src/; rounding is to integer micro second). Moreover "younger marks" (small stars at the icons) are noted (Y) when present. dest/ 2017-03-05 15:33:23.243861000 +0100 empty+000ns -1000ns Y src 2017-03-05 15:33:23.243862000 +0100 empty+044ns rnd down Y src 2017-03-05 15:30:58.417297000 +0100 empty+176ns rnd down Y src 2017-03-05 15:10:56.020244000 +0100 empty+755ns rnd down Y src 2017-03-05 15:39:52.319551000 +0100 empty+913ns rnd down Y src 2017-03-05 12:56:09.036606000 +0100 file+000ns equal 2017-03-05 12:56:09.036606000 +0100 file+060ns rnd down 2017-03-05 15:24:37.712274000 +0100 file+516ns rnd down Y src 2017-03-05 12:57:06.357630000 +0100 file+994ns rnd up 2017-03-05 17:01:26.648818000 +0100 non-empty+000ns equal 2017-03-05 17:01:26.648818000 +0100 non-empty+000ns/file equal 2017-03-05 17:01:26.648818000 +0100 non-empty+167ns rnd down Y src 2017-03-05 17:01:26.648818000 +0100 non-empty+167ns/file rnd down Y src I don't see a simple rule. I (and probably most other users) expected time stamp (dest) = time stanp (src) as by copying with "cp -a …". If this is difficult to realize, it would be fine if the "younger mark" could be suppressed for times that differ by less than, say, 10 micro seconds. Paul. ---- Copied from Debian's BTS up to this point. Verified using the following simple script: $ mkdir foo bar && for i in $(seq 20); do sleep 0.1; touch foo/file$i; done; echo "copy files from foo to bar using meld" ;meld foo bar; ls --full-time bar foo
This was a bug in upstream Python (https://bugs.python.org/issue10148) that appears to have been fixed in Python 3.3. As such, the Meld 3.17 series has fixed this as a side effect of porting to Python 3. I've confirmed the bug in Meld 3.16.x, and confirmed that it doesn't happen in 3.17.0. Thanks anyway for your bug report!