Commit 77ac3290 authored by Seth Jennings's avatar Seth Jennings

check for walkErr before fileInfo deref

parent 843c40e3
...@@ -67,7 +67,7 @@ func (l *DirectoryPluginLoader) Load() (Plugins, error) { ...@@ -67,7 +67,7 @@ func (l *DirectoryPluginLoader) Load() (Plugins, error) {
// read the base directory tree searching for plugin descriptors // read the base directory tree searching for plugin descriptors
// fails silently (descriptors unable to be read or unmarshalled are logged but skipped) // fails silently (descriptors unable to be read or unmarshalled are logged but skipped)
err = filepath.Walk(base, func(path string, fileInfo os.FileInfo, walkErr error) error { err = filepath.Walk(base, func(path string, fileInfo os.FileInfo, walkErr error) error {
if fileInfo.IsDir() || fileInfo.Name() != PluginDescriptorFilename || walkErr != nil { if walkErr != nil || fileInfo.IsDir() || fileInfo.Name() != PluginDescriptorFilename {
return nil return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment