storage: DeleteFile should return errFileNotFound for ENOENT. (#2978)

This commit is contained in:
Harshavardhana
2016-10-17 16:38:46 -07:00
committed by GitHub
parent 0ff359ca0e
commit 8d2347bc7b
3 changed files with 10 additions and 6 deletions
+1 -2
View File
@@ -224,8 +224,7 @@ func cleanupDir(storage StorageAPI, volume, dirPath string) error {
delFunc = func(entryPath string) error {
if !strings.HasSuffix(entryPath, slashSeparator) {
// Delete the file entry.
err := storage.DeleteFile(volume, entryPath)
return traceError(err)
return traceError(storage.DeleteFile(volume, entryPath))
}
// If it's a directory, list and call delFunc() for each entry.