mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
lib/model: Record error for unavailable files (#5066)
This commit is contained in:
parent
f822b10550
commit
5592b8b190
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user