mirror of
https://github.com/coredns/coredns.git
synced 2025-12-05 09:55:10 -05:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user