Fix Panic in Wallet HasDir() (#6857)

* fix panic in has dir
* Merge refs/heads/master into has-dir-panic
* Merge refs/heads/master into has-dir-panic
* Merge refs/heads/master into has-dir-panic
* Merge refs/heads/master into has-dir-panic
* Merge refs/heads/master into has-dir-panic
This commit is contained in:
Raul Jordan 2020-08-04 18:23:15 -05:00 committed by GitHub
parent bc883aab9e
commit 1f9d155f0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -700,6 +700,9 @@ func hasDir(dirPath string) (bool, error) {
if os.IsNotExist(err) { if os.IsNotExist(err) {
return false, nil return false, nil
} }
if info == nil {
return false, nil
}
return info.IsDir(), err return info.IsDir(), err
} }