fixed mock s3 list recursive
This commit is contained in:
parent
8d85d645d6
commit
979ebee677
@ -64,12 +64,10 @@ func (m *mockS3) ListObjectsRecursive(ctx context.Context, id types.ID) ([]Objec
|
|||||||
for k, v := range m.objects {
|
for k, v := range m.objects {
|
||||||
if k.Bucket == id.Bucket {
|
if k.Bucket == id.Bucket {
|
||||||
if strings.HasPrefix(k.Key, id.Key) {
|
if strings.HasPrefix(k.Key, id.Key) {
|
||||||
if k.Parent().Key == id.Key {
|
|
||||||
results = append(results, *mockObjToObject(v, k))
|
results = append(results, *mockObjToObject(v, k))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return results, nil
|
return results, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user