From 4783294a0917fb2af1cec0407d85107431ce2f78 Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Sat, 22 Dec 2018 21:58:17 +0100 Subject: [PATCH] lib/model: Don't pass nil *Matcher to performFinish (fixes #5401) (#5402) --- lib/model/folder_sendrecv.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/model/folder_sendrecv.go b/lib/model/folder_sendrecv.go index 98428add..e1adb82b 100644 --- a/lib/model/folder_sendrecv.go +++ b/lib/model/folder_sendrecv.go @@ -473,7 +473,7 @@ nextFile: // desired state with the delete bit set is in the deletion // map. desired := fileDeletions[candidate.Name] - if err := f.renameFile(candidate, desired, fi, dbUpdateChan, scanChan); err != nil { + if err := f.renameFile(candidate, desired, fi, ignores, dbUpdateChan, scanChan); err != nil { // Failed to rename, try to handle files as separate // deletions and updates. break @@ -815,7 +815,7 @@ func (f *sendReceiveFolder) deleteFile(file protocol.FileInfo, scanChan chan<- s // renameFile attempts to rename an existing file to a destination // and set the right attributes on it. -func (f *sendReceiveFolder) renameFile(cur, source, target protocol.FileInfo, dbUpdateChan chan<- dbUpdateJob, scanChan chan<- string) error { +func (f *sendReceiveFolder) renameFile(cur, source, target protocol.FileInfo, ignores *ignore.Matcher, dbUpdateChan chan<- dbUpdateJob, scanChan chan<- string) error { // Used in the defer closure below, updated by the function body. Take // care not declare another err. var err error @@ -912,7 +912,7 @@ func (f *sendReceiveFolder) renameFile(cur, source, target protocol.FileInfo, db // of the source and the creation of the target temp file. Fix-up the metadata, // update the local index of the target file and rename from temp to real name. - if err = f.performFinish(nil, target, curTarget, true, tempName, dbUpdateChan, scanChan); err != nil { + if err = f.performFinish(ignores, target, curTarget, true, tempName, dbUpdateChan, scanChan); err != nil { return err }