Fix s3 commonPrefix initial issue. (#2732)

fix: fix s3 commonPrefix initial issue.

Signed-off-by: XDTD <1355582364@qq.com>
This commit is contained in:
tan ding 2023-09-19 10:33:36 +08:00 committed by GitHub
parent e636ac76f6
commit bc4611241f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -146,7 +146,7 @@ func (s *s3) GetObjectMetadatas(ctx context.Context, bucketName, prefix, marker,
})
}
commonPrefixes := make([]string, len(resp.CommonPrefixes))
commonPrefixes := make([]string, 0, len(resp.CommonPrefixes))
for _, commonPrefix := range resp.CommonPrefixes {
prefix, err := url.QueryUnescape(*commonPrefix.Prefix)
if err != nil {