lib/model: Don't compare permissions if IgnorePerms is true (fixes #5323) (#5322)

This commit is contained in:
Simon Frei 2018-11-13 08:54:49 +01:00 committed by Jakob Borg
parent 4f27bdfc27
commit 33bed5b1ec

View File

@ -875,7 +875,7 @@ func (f *sendReceiveFolder) renameFile(cur, source, target protocol.FileInfo, db
err = errModified
default:
if fi, err := scanner.CreateFileInfo(stat, target.Name, f.fs); err == nil {
if !fi.IsEquivalentOptional(curTarget, false, true, protocol.LocalAllFlags) {
if !fi.IsEquivalentOptional(curTarget, f.IgnorePerms, true, protocol.LocalAllFlags) {
// Target changed
scanChan <- target.Name
err = errModified
@ -1880,7 +1880,7 @@ func (f *sendReceiveFolder) checkToBeDeleted(cur protocol.FileInfo, scanChan cha
if err != nil {
return err
}
if !fi.IsEquivalentOptional(cur, false, true, protocol.LocalAllFlags) {
if !fi.IsEquivalentOptional(cur, f.IgnorePerms, true, protocol.LocalAllFlags) {
// File changed
scanChan <- cur.Name
return errModified