From 5592b8b19063374608f871970a2a2cb316311764 Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Sat, 14 Jul 2018 15:09:23 +0200 Subject: [PATCH] lib/model: Record error for unavailable files (#5066) --- 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 998fb99b5..842432885 100644 --- a/lib/model/folder_sendrecv.go +++ b/lib/model/folder_sendrecv.go @@ -66,6 +66,7 @@ var ( errDirHasToBeScanned = errors.New("directory contains unexpected files, scheduling scan") errDirHasIgnored = errors.New("directory contains ignored files (see ignore documentation for (?d) prefix)") errDirNotEmpty = errors.New("directory is not empty") + errNotAvailable = errors.New("no connected device has the required version of this file") ) const ( @@ -318,8 +319,7 @@ func (f *sendReceiveFolder) processNeeded(ignores *ignore.Matcher, dbUpdateChan changed++ case runtime.GOOS == "windows" && fs.WindowsInvalidFilename(file.Name): - f.newError("need", file.Name, fs.ErrInvalidFilename) - changed++ + f.newError("pull", file.Name, fs.ErrInvalidFilename) case file.IsDeleted(): if file.IsDirectory() { @@ -353,7 +353,7 @@ func (f *sendReceiveFolder) processNeeded(ignores *ignore.Matcher, dbUpdateChan return true } } - l.Debugln(f, "Needed file is unavailable", file) + f.newError("pull", file.Name, errNotAvailable) case runtime.GOOS == "windows" && file.IsSymlink(): file.SetUnsupported(f.shortID)