lib: Do not set ModifiedBy on meta only changes (#7345)

This commit is contained in:
Simon Frei
2021-02-08 15:30:39 +01:00
committed by GitHub
parent e95d005c21
commit c0f353c0e8
8 changed files with 21 additions and 22 deletions
+4 -4
View File
@@ -652,7 +652,7 @@ func (f *folder) scanSubdirsDeletedAndIgnored(subDirs []string, batch *fileInfoB
if ignoredParent != "" && !fs.IsParent(file.Name, ignoredParent) {
for _, file := range toIgnore {
l.Debugln("marking file as ignored", file)
nf := file.ConvertToIgnoredFileInfo(f.shortID)
nf := file.ConvertToIgnoredFileInfo()
if batchAppend(nf, snap) {
changes++
}
@@ -682,7 +682,7 @@ func (f *folder) scanSubdirsDeletedAndIgnored(subDirs []string, batch *fileInfoB
}
l.Debugln("marking file as ignored", file)
nf := file.ConvertToIgnoredFileInfo(f.shortID)
nf := file.ConvertToIgnoredFileInfo()
if batchAppend(nf, snap) {
changes++
}
@@ -745,7 +745,7 @@ func (f *folder) scanSubdirsDeletedAndIgnored(subDirs []string, batch *fileInfoB
if iterError == nil && len(toIgnore) > 0 {
for _, file := range toIgnore {
l.Debugln("marking file as ignored", f)
nf := file.ConvertToIgnoredFileInfo(f.shortID)
nf := file.ConvertToIgnoredFileInfo()
if batchAppend(nf, snap) {
changes++
}
@@ -1192,7 +1192,7 @@ func (f *folder) handleForcedRescans() {
if !ok {
continue
}
fi.SetMustRescan(f.shortID)
fi.SetMustRescan()
batch.append(fi)
}
+1 -1
View File
@@ -51,7 +51,7 @@ func (f *sendOnlyFolder) pull() bool {
if f.ignores.ShouldIgnore(intf.FileName()) {
file := intf.(protocol.FileInfo)
file.SetIgnored(f.shortID)
file.SetIgnored()
batch = append(batch, file)
batchSizeBytes += file.ProtoSize()
l.Debugln(f, "Handling ignored file", file)
+2 -2
View File
@@ -331,7 +331,7 @@ func (f *sendReceiveFolder) processNeeded(snap *db.Snapshot, dbUpdateChan chan<-
switch {
case f.ignores.ShouldIgnore(file.Name):
file.SetIgnored(f.shortID)
file.SetIgnored()
l.Debugln(f, "Handling ignored file", file)
dbUpdateChan <- dbUpdateJob{file, dbUpdateInvalidate}
@@ -390,7 +390,7 @@ func (f *sendReceiveFolder) processNeeded(snap *db.Snapshot, dbUpdateChan chan<-
f.newPullError(file.Name, fmt.Errorf("handling unsupported symlink: %w", err))
break
}
file.SetUnsupported(f.shortID)
file.SetUnsupported()
l.Debugln(f, "Invalidating symlink (unsupported)", file.Name)
dbUpdateChan <- dbUpdateJob{file, dbUpdateInvalidate}