|
|
@ -138,16 +138,19 @@ func (l *s3EncObjects) ListObjectsV2(ctx context.Context, bucket, prefix, contin |
|
|
|
loi.ContinuationToken = continuationToken |
|
|
|
loi.ContinuationToken = continuationToken |
|
|
|
loi.Objects = make([]minio.ObjectInfo, 0) |
|
|
|
loi.Objects = make([]minio.ObjectInfo, 0) |
|
|
|
loi.Prefixes = make([]string, 0) |
|
|
|
loi.Prefixes = make([]string, 0) |
|
|
|
|
|
|
|
loi.Objects = append(loi.Objects, objects...) |
|
|
|
|
|
|
|
|
|
|
|
for _, obj := range objects { |
|
|
|
|
|
|
|
loi.NextContinuationToken = obj.Name |
|
|
|
|
|
|
|
loi.Objects = append(loi.Objects, obj) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
for _, pfx := range prefixes { |
|
|
|
for _, pfx := range prefixes { |
|
|
|
if pfx != prefix { |
|
|
|
if pfx != prefix { |
|
|
|
loi.Prefixes = append(loi.Prefixes, pfx) |
|
|
|
loi.Prefixes = append(loi.Prefixes, pfx) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Set continuation token if s3 returned truncated list
|
|
|
|
|
|
|
|
if isTruncated { |
|
|
|
|
|
|
|
if len(objects) > 0 { |
|
|
|
|
|
|
|
loi.NextContinuationToken = objects[len(objects)-1].Name |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return loi, nil |
|
|
|
return loi, nil |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|