summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/spf13/viper/util.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/spf13/viper/util.go')
-rw-r--r--vendor/github.com/spf13/viper/util.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/spf13/viper/util.go b/vendor/github.com/spf13/viper/util.go
index 952cad44c..b78896963 100644
--- a/vendor/github.com/spf13/viper/util.go
+++ b/vendor/github.com/spf13/viper/util.go
@@ -114,11 +114,11 @@ func absPathify(inPath string) string {
return ""
}
-// Check if File / Directory Exists
+// Check if file Exists
func exists(fs afero.Fs, path string) (bool, error) {
- _, err := fs.Stat(path)
+ stat, err := fs.Stat(path)
if err == nil {
- return true, nil
+ return !stat.IsDir(), nil
}
if os.IsNotExist(err) {
return false, nil