diff --git a/cmd/xl-storage.go b/cmd/xl-storage.go index dd7617ea4..85135c979 100644 --- a/cmd/xl-storage.go +++ b/cmd/xl-storage.go @@ -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) + } } }()