diff options
author | 2023-12-04 12:51:50 -0500 | |
---|---|---|
committer | 2023-12-04 12:51:50 -0500 | |
commit | 5617d9e0151bd5507ef10505cfe1140c561aa5c4 (patch) | |
tree | a94f52a211374520d7efb805d11b71a395f6a5b8 | |
parent | 30b9ae1bcc28268aadcda1c7e76f9b27b7ef1f28 (diff) | |
download | coredns-5617d9e0151bd5507ef10505cfe1140c561aa5c4.tar.gz coredns-5617d9e0151bd5507ef10505cfe1140c561aa5c4.tar.zst coredns-5617d9e0151bd5507ef10505cfe1140c561aa5c4.zip |
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>
-rw-r--r-- | plugin/auto/walk.go | 5 |
1 files changed, 4 insertions, 1 deletions
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 } |