mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
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.
This commit is contained in:
parent
8d425e3372
commit
1d65ef3201
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user