rb: Better error message when the user passes an object name (#4183)

The new error message is:
```
$ mc rb --force play/testbucket/dir/
mc: <ERROR> Failed to remove `play/testbucket/dir/`. Bucket name `testbucket/dir/` not valid.
```
This commit is contained in:
Anis Elleuch
2022-08-03 08:43:41 -07:00
committed by GitHub
parent 554905ac46
commit 4e42a9e3eb
2 changed files with 16 additions and 11 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ type BucketInvalid struct {
}
func (e BucketInvalid) Error() string {
return "Bucket name " + e.Bucket + " not valid."
return "Bucket name `" + e.Bucket + "` not valid."
}
// ObjectAlreadyExists - typed return for MethodNotAllowed