diff --git a/cmd/rb-main.go b/cmd/rb-main.go index 8bf532be..44eafe29 100644 --- a/cmd/rb-main.go +++ b/cmd/rb-main.go @@ -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