all: Add failure reporting (fixes #7028) (#6925)

This commit is contained in:
Simon Frei
2020-10-07 10:05:13 +02:00
committed by GitHub
parent b1db328931
commit 9d09fd6af3
10 changed files with 356 additions and 85 deletions
+4 -2
View File
@@ -865,11 +865,13 @@ func (f *folder) monitorWatch(ctx context.Context) {
f.setWatchError(err, next)
// This error was previously a panic and should never occur, so generate
// a warning, but don't do it repetitively.
if !warnedOutside {
if _, ok := err.(*fs.ErrWatchEventOutsideRoot); ok {
var errOutside *fs.ErrWatchEventOutsideRoot
if errors.As(err, &errOutside) {
if !warnedOutside {
l.Warnln(err)
warnedOutside = true
}
f.evLogger.Log(events.Failure, "watching for changes encountered an event outside of the filesystem root")
}
aggrCancel()
errChan = nil