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 <cohaver@infoblox.com>

---------

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
This commit is contained in:
Chris O'Haver
2023-12-04 12:51:50 -05:00
committed by GitHub
parent 30b9ae1bcc
commit 5617d9e015

View File

@@ -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
}