fs: Return errVolumeNotEmpty properly if path not empty. (#4794)

Refer #4770
This commit is contained in:
Harshavardhana 2017-08-12 19:24:20 -07:00 committed by Dee Koder
parent d20cdac304
commit b69aa9c4d0

View File

@ -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)
}