mirror of
https://github.com/minio/minio.git
synced 2025-02-04 02:15:59 -05:00
gcs: Limit number of objects listed to max-keys (#6133)
This commit is contained in:
parent
7c4a41b933
commit
a1ef90be52
@ -669,7 +669,6 @@ func (l *gcsGateway) ListObjectsV2(ctx context.Context, bucket, prefix, continua
|
||||
})
|
||||
|
||||
isTruncated := false
|
||||
it.PageInfo().MaxSize = maxKeys
|
||||
|
||||
if continuationToken != "" {
|
||||
// If client sends continuationToken, set it
|
||||
@ -687,7 +686,7 @@ func (l *gcsGateway) ListObjectsV2(ctx context.Context, bucket, prefix, continua
|
||||
var prefixes []string
|
||||
var objects []minio.ObjectInfo
|
||||
|
||||
for {
|
||||
for keyCount := 0; keyCount < maxKeys; keyCount++ {
|
||||
attrs, err := it.Next()
|
||||
if err == iterator.Done {
|
||||
break
|
||||
|
Loading…
x
Reference in New Issue
Block a user