storage/driver/s3: correct response on list of missing directory
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
dc5b71afb0
commit
10f7b7bf95
1 changed files with 6 additions and 0 deletions
|
@ -685,6 +685,12 @@ func (d *driver) List(ctx context.Context, path string) ([]string, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if len(listResponse.Contents) == 0 {
|
||||
// Treat empty response as missing directory, since we don't actually
|
||||
// have directories in s3.
|
||||
return nil, storagedriver.PathNotFoundError{Path: path}
|
||||
}
|
||||
|
||||
files := []string{}
|
||||
directories := []string{}
|
||||
|
||||
|
|
Loading…
Reference in a new issue