Add check for nil

This commit is contained in:
Michael Eder 2022-02-03 09:25:28 +01:00
parent a7eda1d12c
commit 459d124449
1 changed files with 4 additions and 1 deletions

View File

@ -22,6 +22,9 @@ func Exists(name string) bool {
if os.IsNotExist(err) {
return false
}
if i == nil {
return false
}
return i.IsDir()
}