lib/model: Don't error on pulling deletion of invalid file (fixes #5791) (#5792)

This commit is contained in:
Simon Frei 2019-06-14 08:48:14 +02:00 committed by GitHub
parent bff1a5f5e4
commit abd363e8bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -326,7 +326,17 @@ func (f *sendReceiveFolder) processNeeded(dbUpdateChan chan<- dbUpdateJob, copyC
changed++ changed++
case runtime.GOOS == "windows" && fs.WindowsInvalidFilename(file.Name): 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(): case file.IsDeleted():
if file.IsDirectory() { if file.IsDirectory() {