rb: avoid throwing error for force delete of prefix (#4436)
This commit is contained in:
@@ -199,6 +199,15 @@ func deleteBucket(ctx context.Context, url string, isForce bool) *probe.Error {
|
||||
return result.Err.Trace(url)
|
||||
}
|
||||
}
|
||||
// Return early if prefix delete
|
||||
switch c := clnt.(type) {
|
||||
case *S3Client:
|
||||
_, object := c.url2BucketAndObject()
|
||||
if object != "" && isForce {
|
||||
return nil
|
||||
}
|
||||
default:
|
||||
}
|
||||
|
||||
// Remove a bucket without force flag first because force
|
||||
// won't work if a bucket has some locking rules, that's
|
||||
|
||||
Reference in New Issue
Block a user