Fixes filesystem storage driver List semantics for nonexistent directory
Now returns a PathNotFoundError
This commit is contained in:
parent
3c0dbe2595
commit
bc8ab9b392
1 changed files with 3 additions and 0 deletions
|
@ -201,6 +201,9 @@ func (d *Driver) List(subPath string) ([]string, error) {
|
||||||
|
|
||||||
dir, err := os.Open(fullPath)
|
dir, err := os.Open(fullPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if os.IsNotExist(err) {
|
||||||
|
return nil, storagedriver.PathNotFoundError{Path: subPath}
|
||||||
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue