From 1d65ef32019a7a0c46dba7be117ea4b2b01e72e4 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 13 Jul 2020 09:01:17 -0700 Subject: [PATCH] fix: deletes on older format properly (#10029) while we handle all situations for writes and reads on older format, what we didn't cater for properly yet was delete where we only ended up deleting just `xl.meta` - instead we should allow all the deletes to go through for older format without versioning enabled buckets. --- cmd/xl-storage.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cmd/xl-storage.go b/cmd/xl-storage.go index de89a18b6..ab0b12017 100644 --- a/cmd/xl-storage.go +++ b/cmd/xl-storage.go @@ -1100,12 +1100,7 @@ func (s *xlStorage) DeleteVersion(volume, path string, fi FileInfo) error { if !isXL2V1Format(buf) { // Delete the meta file, if there are no more versions the // top level parent is automatically removed. - filePath := pathJoin(volumeDir, path, xlStorageFormatFile) - if err = checkPathLength(filePath); err != nil { - return err - } - - return deleteFile(volumeDir, filePath, false) + return deleteFile(volumeDir, pathJoin(volumeDir, path), true) } var xlMeta xlMetaV2