lib/model: Set platform data for new folders w/ ignorePerms (ref #8883) (#8907)

* Platform data (ownership, xattrs, etc.) is now set correctly for newly-received folders, even if the received folder has the NoPermissions flag.

* Call setPlatformData on receivers that have ignorePerms set to true.
This commit is contained in:
Anthony Goeckner
2023-05-17 02:06:50 -05:00
committed by GitHub
parent 0b3a101ccd
commit 405cdedcd3

View File

@@ -622,7 +622,7 @@ func (f *sendReceiveFolder) handleDir(file protocol.FileInfo, snap *db.Snapshot,
// not MkdirAll because the parent should already exist.
mkdir := func(path string) error {
err = f.mtimefs.Mkdir(path, mode)
if err != nil || f.IgnorePerms {
if err != nil {
return err
}
@@ -631,7 +631,7 @@ func (f *sendReceiveFolder) handleDir(file protocol.FileInfo, snap *db.Snapshot,
return err
}
if file.NoPermissions {
if f.IgnorePerms || file.NoPermissions {
return nil
}