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

Change-Id: I5e96fe761d3833c962084fd2d597f47e8a72e7c2
Signed-off-by: Li Yi <denverdino@gmail.com>
This commit is contained in:
Li Yi 2015-12-01 17:06:06 +08:00 committed by Stephen J Day
parent aa08ced9d7
commit 3a5c6446d8

View file

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