mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
fix: error checking in DeleteBucket (#16929)
This commit is contained in:
parent
7a6c4e438e
commit
dc8fdcb9c9
@ -1658,14 +1658,14 @@ func (z *erasureServerPools) DeleteBucket(ctx context.Context, bucket string, op
|
||||
}
|
||||
|
||||
err := z.s3Peer.DeleteBucket(ctx, bucket, opts)
|
||||
if err == nil || errors.Is(err, errVolumeNotFound) {
|
||||
if err == nil || isErrBucketNotFound(err) {
|
||||
// If site replication is configured, hold on to deleted bucket state until sites sync
|
||||
if opts.SRDeleteOp == MarkDelete {
|
||||
z.s3Peer.MakeBucket(context.Background(), pathJoin(minioMetaBucket, bucketMetaPrefix, deletedBucketsPrefix, bucket), MakeBucketOptions{})
|
||||
}
|
||||
}
|
||||
|
||||
if err != nil && !errors.Is(err, errVolumeNotFound) {
|
||||
if err != nil && !isErrBucketNotFound(err) {
|
||||
if !opts.NoRecreate {
|
||||
z.s3Peer.MakeBucket(ctx, bucket, MakeBucketOptions{})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user