allow deletes on directory objects to perform permanent deletes (#17132)

This commit is contained in:
Harshavardhana
2023-05-04 14:43:52 -07:00
committed by GitHub
parent 06cd0a636e
commit 1d0211d395
7 changed files with 58 additions and 9 deletions

View File

@@ -540,6 +540,11 @@ func (api objectAPIHandlers) DeleteMultipleObjectsHandler(w http.ResponseWriter,
oss[index].SetTransitionState(goi.TransitionedObject)
}
// All deletes on directory objects needs to be for `nullVersionID`
if isDirObject(object.ObjectName) && object.VersionID == "" {
object.VersionID = nullVersionID
}
if replicateDeletes {
dsc = checkReplicateDelete(ctx, bucket, ObjectToDelete{
ObjectV: ObjectV{