Preflight Checklist
Viper Version
1.19.0
Go Version
1.23.5
Config Source
Flags
Format
YAML
Repl.it link
No response
Code reproducing the issue
viper.SetConfigName("testfile")
viper.SetConfigType("yaml")
viper.AddConfigPath("/dir/dir2/testfile")
Expected Behavior
When searching if file exists, file path should only be searched with list of available extension and custom extension if provided in config.
Actual Behavior
In line 86 in file.go , extension is not added while checking exists so incorrect files will be matched.
Steps To Reproduce
No response
Additional Information
No response
Preflight Checklist
Viper Version
1.19.0
Go Version
1.23.5
Config Source
Flags
Format
YAML
Repl.it link
No response
Code reproducing the issue
Expected Behavior
When searching if file exists, file path should only be searched with list of available extension and custom extension if provided in config.
Actual Behavior
In line 86 in file.go , extension is not added while checking exists so incorrect files will be matched.
Steps To Reproduce
No response
Additional Information
No response