Fixed issue where util.IsFile() was returning true for directories

This commit is contained in:
Gregory Kurtzer
2021-09-06 17:37:50 -07:00
parent 90c997a4a1
commit 16843d8b4e

View File

@@ -157,7 +157,7 @@ func IsFile(path string) bool {
return false
}
if _, err := os.Stat(path); err == nil {
if stat, err := os.Stat(path); err == nil && !stat.IsDir() {
return true
}
return false