Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

timestamp comparison #17

Open
tkhyn opened this issue Apr 26, 2018 · 1 comment
Open

timestamp comparison #17

tkhyn opened this issue Apr 26, 2018 · 1 comment
Labels
bug Something isn't working major

Comments

@tkhyn
Copy link
Owner

tkhyn commented Apr 26, 2018

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

@tkhyn
Copy link
Owner Author

tkhyn commented Apr 27, 2018

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 ...

@tkhyn tkhyn added major bug Something isn't working labels Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

1 participant