vendor/github.com/spf13/viper/util.go
changeset 251 1c52a0eeb952
parent 242 2a9ec03fe5a1
child 256 6d9efbef00a9
--- a/vendor/github.com/spf13/viper/util.go	Wed Sep 18 19:17:42 2019 +0200
+++ b/vendor/github.com/spf13/viper/util.go	Sun Feb 16 18:54:01 2020 +0100
@@ -114,11 +114,11 @@
 	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