Fix for stevvooe:check-storage-drivers-list-path-not-found in OSS driver

Change-Id: I5e96fe761d3833c962084fd2d597f47e8a72e7c2
Signed-off-by: Li Yi <denverdino@gmail.com>
pull/1187/head
Li Yi 2015-12-01 17:06:06 +08:00 committed by Stephen J Day
parent 79d4d7f546
commit 7161fa0559
1 changed files with 6 additions and 0 deletions

View File

@ -669,6 +669,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 OSS.
return nil, storagedriver.PathNotFoundError{Path: path}
}
files := []string{}
directories := []string{}