simplify bucketInfo return in GetBucketInfo peer call (#16983)

This commit is contained in:
jiuker 2023-04-06 16:30:50 +08:00 committed by GitHub
parent 111c7d4026
commit 0320ac43cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,14 +169,7 @@ func (sys *S3PeerSys) GetBucketInfo(ctx context.Context, bucket string, opts Buc
if err = reduceReadQuorumErrs(ctx, errs, bucketOpIgnoredErrs, quorum); err != nil {
return BucketInfo{}, toObjectErr(err, bucket)
}
for i, err := range errs {
if err == nil {
bucketInfo = bucketInfos[i]
break
}
}
return bucketInfo, nil
}