Skip to content

Commit

Permalink
lib/model: Don't error on pulling deletion of invalid file (fixes #5791
Browse files Browse the repository at this point in the history
…) (#5792)
  • Loading branch information
imsodin committed Jun 14, 2019
1 parent bff1a5f commit abd363e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/model/folder_sendrecv.go
Expand Up @@ -326,7 +326,17 @@ func (f *sendReceiveFolder) processNeeded(dbUpdateChan chan<- dbUpdateJob, copyC
changed++

case runtime.GOOS == "windows" && fs.WindowsInvalidFilename(file.Name):
f.newPullError(file.Name, fs.ErrInvalidFilename)
if file.IsDeleted() {
// Just pretend we deleted it, no reason to create an error
// about a deleted file that we can't have anyway.
// Reason we need it in the first place is, that it was
// ignored at some point.
dbUpdateChan <- dbUpdateJob{file, dbUpdateDeleteFile}
changed++
} else {
// We can't pull an invalid file.
f.newPullError(file.Name, fs.ErrInvalidFilename)
}

case file.IsDeleted():
if file.IsDirectory() {
Expand Down

0 comments on commit abd363e

Please sign in to comment.