diff --git a/scanner/walk_dir_tree.go b/scanner/walk_dir_tree.go index 8500824cf..59b73f56a 100644 --- a/scanner/walk_dir_tree.go +++ b/scanner/walk_dir_tree.go @@ -34,10 +34,14 @@ func walkDirTree(ctx context.Context, job *scanJob, targetFolders ...string) (<- // Create checker and push patterns from root to this folder checker := newIgnoreChecker(job.fs) - _ = checker.PushAllParents(ctx, folderPath) + err := checker.PushAllParents(ctx, folderPath) + if err != nil { + log.Error(ctx, "Scanner: Error pushing ignore patterns for target folder", "path", folderPath, err) + continue + } // Recursively walk this folder and all its children - err := walkFolder(ctx, job, folderPath, checker, results) + err = walkFolder(ctx, job, folderPath, checker, results) if err != nil { log.Error(ctx, "Scanner: Error walking target folder", "path", folderPath, err) continue diff --git a/scanner/watcher.go b/scanner/watcher.go index 3b47f8416..ad9a06421 100644 --- a/scanner/watcher.go +++ b/scanner/watcher.go @@ -308,7 +308,10 @@ func resolveFolderPath(fsys fs.FS, path string) string { // in the library. It pushes all parent folders onto the IgnoreChecker stack before checking. func (w *watcher) shouldIgnoreFolderPath(ctx context.Context, fsys storage.MusicFS, folderPath string) bool { checker := newIgnoreChecker(fsys) - _ = checker.PushAllParents(ctx, folderPath) + err := checker.PushAllParents(ctx, folderPath) + if err != nil { + log.Warn(ctx, "Watcher: Error pushing ignore patterns for folder", "path", folderPath, err) + } return checker.ShouldIgnore(ctx, folderPath) }