Fix: mc rm to error when nonempty directory is deleted (#2303)
Example: when mc rm play/testbucket/folder1 is attempted and directory is nonempty, exit with an error message
This commit is contained in:
+1
-1
@@ -141,7 +141,7 @@ func removeSingle(url string, isIncomplete bool, isFake bool, older int) error {
|
||||
errorIf(pErr.Trace(url), "Invalid argument `"+url+"`.")
|
||||
return exitStatus(globalErrorExitStatus) // End of journey.
|
||||
}
|
||||
isFetchMeta := false
|
||||
isFetchMeta := true
|
||||
content, pErr := clnt.Stat(isIncomplete, isFetchMeta)
|
||||
if pErr != nil {
|
||||
errorIf(pErr.Trace(url), "Failed to remove `"+url+"`.")
|
||||
|
||||
Reference in New Issue
Block a user