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:
parent
79d4d7f546
commit
7161fa0559
1 changed files with 6 additions and 0 deletions
|
@ -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{}
|
||||
|
||||
|
|
Loading…
Reference in a new issue