1
0
Fork 1
mirror of https://github.com/distribution/distribution synced 2024-09-22 10:29:49 +00:00

Fixes filesystem storage driver List semantics for nonexistent directory

Now returns a PathNotFoundError
This commit is contained in:
Brian Bland 2014-12-17 16:56:36 -08:00
parent 3c0dbe2595
commit bc8ab9b392

View file

@ -201,6 +201,9 @@ func (d *Driver) List(subPath string) ([]string, error) {
dir, err := os.Open(fullPath)
if err != nil {
if os.IsNotExist(err) {
return nil, storagedriver.PathNotFoundError{Path: subPath}
}
return nil, err
}