mirror of https://github.com/minio/minio.git
fs: Return prefix as listing marker if no objects (#14143)
Fixes #14132
This commit is contained in:
parent
1278b0ec73
commit
e1a0a1e73c
|
@ -164,6 +164,8 @@ func listObjectsNonSlash(ctx context.Context, bucket, prefix, marker, delimiter
|
|||
result.IsTruncated = true
|
||||
if len(objInfos) > 0 {
|
||||
result.NextMarker = objInfos[len(objInfos)-1].Name
|
||||
} else if len(result.Prefixes) > 0 {
|
||||
result.NextMarker = result.Prefixes[len(result.Prefixes)-1]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -399,6 +401,8 @@ func listObjects(ctx context.Context, obj ObjectLayer, bucket, prefix, marker, d
|
|||
result.IsTruncated = true
|
||||
if len(objInfos) > 0 {
|
||||
result.NextMarker = objInfos[len(objInfos)-1].Name
|
||||
} else if len(result.Prefixes) > 0 {
|
||||
result.NextMarker = result.Prefixes[len(result.Prefixes)-1]
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue