dirsync
dirsync copied to clipboard
timestamp comparison
Original report by Anonymous.
fat and ntfs file system timestamp resolutions are different namely 2s and 100ms. Thus when syncing with different file system although the file is not changed , dirsync updates the files again again.Suggestion:
epsilon value in _cmptimestamps function might be setup based on file system working on.
mtime_cmp = int((filest1.st_mtime - filest2.st_mtime) * 1000) > 0
Hi, thanks for reporting this edge case.
Maybe the most robust thing to do would be to set the timestamp of the origin file to the one of the target file when copying, after the copy if they differ regardless of the file systems? It may slow things a bit, though ...