1
0
mirror of https://github.com/minio/minio.git synced 2025-04-01 02:03:42 -04:00

do not attempt force delete on bucket ()

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

fixes 
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

@ -671,7 +671,9 @@ func (z *erasureServerPools) MakeBucketWithLocation(ctx context.Context, bucket
if err != nil { if err != nil {
if _, ok := err.(BucketExists); !ok { if _, ok := err.(BucketExists); !ok {
// Delete created buckets, ignoring errors. // 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 return err
} }