From 410e84d2737c030c9f36c9b140ab5da8bfc5ad27 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Wed, 24 Mar 2021 09:35:45 -0700 Subject: [PATCH] xl: add checks for minioTmpMetaBucket in CreateFile --- cmd/xl-storage.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) + } } }()