fixed mock s3 list recursive

This commit is contained in:
Djeeberjr 2021-11-25 01:56:57 +01:00
parent 8d85d645d6
commit 979ebee677

View File

@ -64,9 +64,7 @@ func (m *mockS3) ListObjectsRecursive(ctx context.Context, id types.ID) ([]Objec
for k, v := range m.objects {
if k.Bucket == id.Bucket {
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))
}
}
}