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
b45078eb44
commit
a889f46223
@ -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 New Issue
Block a user