diff options
author | Anthony Goeckner <agoeckner@users.noreply.github.com> | 2023-05-17 02:06:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-17 09:06:50 +0200 |
commit | 405cdedcd392e775f7173adfd378a006e7689974 (patch) | |
tree | 37e2661faa671c6f5dcdb80432ad681cc75b0e15 | |
parent | 0b3a101ccd547a5ffeae081131d79e60aaeead2d (diff) |
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.
-rw-r--r-- | lib/model/folder_sendrecv.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/model/folder_sendrecv.go b/lib/model/folder_sendrecv.go index c12377acb4..218124c6a4 100644 --- a/lib/model/folder_sendrecv.go +++ b/lib/model/folder_sendrecv.go @@ -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 } |