xl: add checks for minioTmpMetaBucket in CreateFile

This commit is contained in:
Harshavardhana 2021-03-24 09:35:45 -07:00
parent 75741dbf4a
commit 410e84d273
1 changed files with 3 additions and 1 deletions

View File

@ -1432,7 +1432,9 @@ func (s *xlStorage) CreateFile(ctx context.Context, volume, path string, fileSiz
parentFilePath := pathutil.Dir(filePath)
defer func() {
if err != nil {
removeAll(parentFilePath)
if volume == minioMetaTmpBucket {
removeAll(parentFilePath)
}
}
}()