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:
Stephen J Day 2015-11-24 14:23:12 -08:00
parent b45078eb44
commit a889f46223

View File

@ -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{}