From b69aa9c4d0c5f12699718b5fca502697de2ed83b Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 12 Aug 2017 19:24:20 -0700 Subject: [PATCH] fs: Return errVolumeNotEmpty properly if path not empty. (#4794) Refer #4770 --- cmd/fs-v1-helpers.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/fs-v1-helpers.go b/cmd/fs-v1-helpers.go index 057da9d29..597dd71e5 100644 --- a/cmd/fs-v1-helpers.go +++ b/cmd/fs-v1-helpers.go @@ -61,6 +61,8 @@ func fsRemoveAll(dirPath string) (err error) { if err = removeAll(dirPath); err != nil { if os.IsPermission(err) { return traceError(errVolumeAccessDenied) + } else if isSysErrNotEmpty(err) { + return traceError(errVolumeNotEmpty) } return traceError(err) }