mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 21:50:22 +03:00
Improve ListObject Compatibility (#18099)
Do not error out when a provided marker is before or after the prefix, but instead just ignore it if before and return an empty list when after. Fixes #18093
This commit is contained in:
@@ -60,6 +60,10 @@ func (z *erasureServerPools) listPath(ctx context.Context, o *listPathOptions) (
|
||||
if err := checkListObjsArgs(ctx, o.Bucket, o.Prefix, o.Marker, z); err != nil {
|
||||
return entries, err
|
||||
}
|
||||
// Marker points to before the prefix, just ignore it.
|
||||
if o.Marker < o.Prefix {
|
||||
o.Marker = ""
|
||||
}
|
||||
|
||||
// Marker is set validate pre-condition.
|
||||
if o.Marker != "" && o.Prefix != "" {
|
||||
|
||||
Reference in New Issue
Block a user