mirror of https://github.com/nyancrimew/goop.git
Add check for nil
This commit is contained in:
parent
a7eda1d12c
commit
459d124449
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue