do not attempt force delete on bucket (#14452)

caller needs to ask explicitly for force delete
otherwise, the force delete might end up deleting
an existing bucket with data.

fixes #14445
This commit is contained in:
Harshavardhana 2022-03-02 20:47:53 -08:00 committed by GitHub
parent 5b5deee5b3
commit 7e803adf13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -671,7 +671,9 @@ func (z *erasureServerPools) MakeBucketWithLocation(ctx context.Context, bucket
if err != nil {
if _, ok := err.(BucketExists); !ok {
// Delete created buckets, ignoring errors.
z.DeleteBucket(context.Background(), bucket, DeleteBucketOptions{Force: true, NoRecreate: true})
z.DeleteBucket(context.Background(), bucket, DeleteBucketOptions{
Force: false, NoRecreate: true,
})
}
return err
}