diff --git a/cmd/erasure-object.go b/cmd/erasure-object.go index 34381cc54..423e96c2f 100644 --- a/cmd/erasure-object.go +++ b/cmd/erasure-object.go @@ -1502,10 +1502,11 @@ func (er erasureObjects) DeleteObject(ctx context.Context, bucket, object string modTime = UTCNow() } fvID := mustGetUUID() + if markDelete && (opts.Versioned || opts.VersionSuspended) { fi := FileInfo{ Name: object, - Deleted: deleteMarker, + Deleted: true, MarkDeleted: markDelete, ModTime: modTime, ReplicationState: opts.DeleteReplication,