Ignore unknown config files in config dir

Swap files etc.

Fixes #5646
This commit is contained in:
Bjørn Erik Pedersen
2019-02-01 07:45:35 +01:00
parent d9282cf98a
commit 3244cb3b31
4 changed files with 59 additions and 2 deletions

View File

@@ -283,6 +283,10 @@ func (l configLoader) loadConfigFromConfigDir(v *viper.Viper) ([]string, error)
return nil
}
if !config.IsValidConfigFilename(path) {
return nil
}
name := helpers.Filename(filepath.Base(path))
item, err := metadecoders.Default.UnmarshalFileToMap(sourceFs, path)