lib/model: Correctly set xattrs on temp files (fixes #8667) (#8670)

This commit is contained in:
Jakob Borg
2022-11-11 11:49:15 +01:00
committed by GitHub
parent 1b32e9f858
commit 6aa04118a6
2 changed files with 43 additions and 1 deletions
+1 -1
View File
@@ -2120,7 +2120,7 @@ func (f *sendReceiveFolder) checkToBeDeleted(file, cur protocol.FileInfo, hasCur
func (f *sendReceiveFolder) setPlatformData(file *protocol.FileInfo, name string) error {
if f.SyncXattrs {
// Set extended attributes.
if err := f.mtimefs.SetXattr(file.Name, file.Platform.Xattrs(), f.XattrFilter); errors.Is(err, fs.ErrXattrsNotSupported) {
if err := f.mtimefs.SetXattr(name, file.Platform.Xattrs(), f.XattrFilter); errors.Is(err, fs.ErrXattrsNotSupported) {
l.Debugf("Cannot set xattrs on %q: %v", file.Name, err)
} else if err != nil {
return err