[#513] Don't remove delete mark object

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-06-07 11:54:42 +03:00 committed by Alex Vanin
parent 41c815441b
commit 59570ac075

View file

@ -531,11 +531,10 @@ func (n *layer) removeVersionIfFound(ctx context.Context, bkt *data.BucketInfo,
var deleteMarkVersion string var deleteMarkVersion string
if version.DeleteMarker != nil { if version.DeleteMarker != nil {
deleteMarkVersion = obj.VersionID deleteMarkVersion = obj.VersionID
} } else if err := n.objectDelete(ctx, bkt, version.OID); err != nil {
if err := n.objectDelete(ctx, bkt, version.OID); err != nil {
return deleteMarkVersion, err return deleteMarkVersion, err
} }
return deleteMarkVersion, n.treeService.RemoveVersion(ctx, &bkt.CID, version.ID) return deleteMarkVersion, n.treeService.RemoveVersion(ctx, &bkt.CID, version.ID)
} }