forked from TrueCloudLab/distribution
Merge pull request #1323 from aibaars/gcs-fix-list-empty
GCS Storagedriver: fix test failure caused by #1187
This commit is contained in:
commit
0acca63b93
1 changed files with 5 additions and 0 deletions
|
@ -461,6 +461,11 @@ func (d *driver) List(context ctx.Context, path string) ([]string, error) {
|
|||
break
|
||||
}
|
||||
}
|
||||
if path != "/" && len(list) == 0 {
|
||||
// Treat empty response as missing directory, since we don't actually
|
||||
// have directories in Google Cloud Storage.
|
||||
return nil, storagedriver.PathNotFoundError{Path: path}
|
||||
}
|
||||
return list, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue