Fixed issue where util.IsFile() was returning true for directories
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user