mirror of
https://github.com/minio/minio.git
synced 2025-11-08 21:24:55 -05:00
fix list results returned for spark max-keys=2 listing (#19791)
This PR continues fix #19725 for some unhandled cases
This commit is contained in:
@@ -1647,12 +1647,17 @@ func (z *erasureServerPools) listObjectsGeneric(ctx context.Context, bucket, pre
|
||||
}
|
||||
}
|
||||
}
|
||||
if o.DeleteMarker {
|
||||
switch {
|
||||
case o.DeleteMarker:
|
||||
loi.Objects = append(loi.Objects, ObjectInfo{Bucket: bucket, IsDir: true, Name: prefix})
|
||||
return loi, nil
|
||||
} else if len(li.Objects) == 1 {
|
||||
case len(li.Objects) >= 1:
|
||||
loi.Objects = append(loi.Objects, o)
|
||||
loi.Prefixes = append(loi.Prefixes, path.Join(opts.Prefix, pfx))
|
||||
if pfx != "" {
|
||||
loi.Prefixes = append(loi.Prefixes, path.Join(opts.Prefix, pfx))
|
||||
}
|
||||
case len(li.Prefixes) > 0:
|
||||
loi.Prefixes = append(loi.Prefixes, li.Prefixes...)
|
||||
}
|
||||
}
|
||||
return loi, nil
|
||||
|
||||
Reference in New Issue
Block a user