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
aa08ced9d7
commit
3a5c6446d8
@ -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 New Issue
Block a user