Protect multipart directory from removing when it is empty (#3315)

This commit is contained in:
Anis Elleuch
2016-11-22 22:15:06 +01:00
committed by Harshavardhana
parent dd93f808c8
commit 339c9019b9
11 changed files with 124 additions and 115 deletions

View File

@@ -189,7 +189,7 @@ func (fs fsObjects) DeleteBucket(bucket string) error {
return toObjectErr(traceError(err), bucket)
}
// Cleanup all the previously incomplete multiparts.
if err := cleanupDir(fs.storage, path.Join(minioMetaBucket, mpartMetaPrefix), bucket); err != nil && errorCause(err) != errVolumeNotFound {
if err := cleanupDir(fs.storage, minioMetaMultipartBucket, bucket); err != nil && errorCause(err) != errVolumeNotFound {
return toObjectErr(err, bucket)
}
return nil