From 32a8f34f7d815c61c04cd94c225129d37281b412 Mon Sep 17 00:00:00 2001 From: poornas Date: Thu, 9 Nov 2017 18:28:53 -0800 Subject: [PATCH] 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 --- cmd/rm-main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/rm-main.go b/cmd/rm-main.go index b1b8f1a3..9a057f7e 100644 --- a/cmd/rm-main.go +++ b/cmd/rm-main.go @@ -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+"`.")