forked from TrueCloudLab/distribution
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
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
|
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{}
|
files := []string{}
|
||||||
directories := []string{}
|
directories := []string{}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue