syncthing icon indicating copy to clipboard operation
syncthing copied to clipboard

Mode and modification times on directories should be preserved

Open jpjp opened this issue 12 years ago • 11 comments

If I sync a file, the metadata on the target is different from on the source. So far I have only checked output from stat, not xattrs.

jpjp avatar Jan 06 '14 15:01 jpjp

Could you expand on which metadata it is you are looking for, specifically (i.e. Spotlight keywords, labels, resource forks, Windows extended attributes...)? Some might be possible, some might be to OS specific to be suitable, I'm not sure, haven't thought it through yet. :)

calmh avatar Jan 06 '14 17:01 calmh

Sure: everything returned by stat, and most of the stuff returned by attr -l FILE (probably not the selinux context though)

jpjp avatar Jan 06 '14 18:01 jpjp

Right. That's Linux specific then; not impossible for sure, but not probably something I will prioritize.

calmh avatar Jan 06 '14 18:01 calmh

Your choice :) I just found it confusing that the directories sorted by date were different. I think it might prevent users from seeing which version of a file they have if the mtime, etc is different.

jpjp avatar Jan 06 '14 19:01 jpjp

Ah... Times should be preserved for sure. It does that now for files, because files are what it synchronizes, but not directories. That also means empty directories will not be synchronized (or deleted)... Perhaps that is something that should be fixed. I'll tag that as a bug.

calmh avatar Jan 06 '14 20:01 calmh

I'm changing the title on this to apply to the directory time issue; feel free to open other issues on other metadata.

calmh avatar Jan 07 '14 10:01 calmh

https://github.com/calmh/syncthing/issues/20 opened.

jpjp avatar Jan 07 '14 12:01 jpjp

This turned out to be more of a pain than I expected, shuffling it forward a bit while I think about more elegant solutions...

calmh avatar Jan 09 '14 08:01 calmh

Writing this here so I don't forget (again): touch ~/Sync/file1 will not be synced across the cluster because it is zero length.

jpjp avatar Jan 28 '14 19:01 jpjp

(-> #44)

calmh avatar Jan 28 '14 20:01 calmh

This is ready to merge soon, notes and discussion at http://discourse.syncthing.net/t/v0-7-2-directory-syncing/16

calmh avatar Apr 02 '14 07:04 calmh