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.
master
Harshavardhana 4 years ago committed by GitHub
parent 8d425e3372
commit 1d65ef3201
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      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

Loading…
Cancel
Save