mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 10:58:57 +00:00
lib/model: Set platform data, incl. copying ownership, for new folders w/ NoPermissions flag (#8883)
Platform data (ownership, xattrs, etc.) is now set correctly for newly-received folders, even if the received folder has the NoPermissions flag.
This commit is contained in:
parent
a4fa764b7d
commit
7e31ec5417
@ -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 || file.NoPermissions {
|
||||
if err != nil || f.IgnorePerms {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -631,6 +631,10 @@ func (f *sendReceiveFolder) handleDir(file protocol.FileInfo, snap *db.Snapshot,
|
||||
return err
|
||||
}
|
||||
|
||||
if file.NoPermissions {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Stat the directory so we can check its permissions.
|
||||
info, err := f.mtimefs.Lstat(path)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user