dat icon indicating copy to clipboard operation
dat copied to clipboard

sync mtime

Open apexo opened this issue 7 years ago • 2 comments

This is kind of a feature request / question.

Currently (dat v13.11.4) dat does not seem to sync mtime.

Is there an inherent design limitation or another reason why this cannot be/should not be supported?

My use case: I'm currently trying to use dat to sync my photo collection to other machines. They are from different sources and the file names are mostly rubbish and exif metadata is also very inconsistent, so the mtime is sometimes the only (more or less accurate) information of when a photo was taken.

apexo avatar Sep 24 '18 10:09 apexo

@apexo I'm not deep in the dat-cli's dev but the question that came to my mind is:

Is the issue that, when importing a file the mtime isn't preserved? If so, I remember some debate over whether them mtime should be copied over from the FS's metadata or if it should reflect when the file was written to the dat.

pfrazee avatar Sep 24 '18 16:09 pfrazee

The mtime of the file that is originally added to the dat is preserved in the filesystem. When cloning the dat, the mtime of the files in the clone reflects the time of when the individual files where written to disk (i.e.: they neither match the original mtime nor the time when the file was added to the dat).

I don't have a use case, where time-of-add would be relevant for me (if necessary, I can look it up in the log). Preserving the original mtime seems more useful to me.

apexo avatar Sep 24 '18 18:09 apexo