From 5617d9e0151bd5507ef10505cfe1140c561aa5c4 Mon Sep 17 00:00:00 2001 From: Chris O'Haver Date: Mon, 4 Dec 2023 12:51:50 -0500 Subject: [PATCH] plugin/auto: warn when auto is unable to read elements of the directory tree (#6333) * warn when auto is unable to read elements of the directory tree Signed-off-by: Chris O'Haver --------- Signed-off-by: Chris O'Haver --- plugin/auto/walk.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/auto/walk.go b/plugin/auto/walk.go index c7dd4e9c9..38f637592 100644 --- a/plugin/auto/walk.go +++ b/plugin/auto/walk.go @@ -19,7 +19,10 @@ func (a Auto) Walk() error { toDelete[n] = true } - filepath.Walk(a.loader.directory, func(path string, info os.FileInfo, _ error) error { + filepath.Walk(a.loader.directory, func(path string, info os.FileInfo, e error) error { + if e != nil { + log.Warningf("error reading %v: %v", path, e) + } if info == nil || info.IsDir() { return nil }