Merge pull request #14 from edermi/main

Add check for nil
This commit is contained in:
maia arson crimew 2022-02-03 16:28:57 +01:00 committed by GitHub
commit f78c604ff8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,10 @@ func Exists(name string) bool {
if err == nil {
return true
}
if os.IsNotExist(err){
if os.IsNotExist(err) {
return false
}
if i == nil {
return false
}
return i.IsDir()