From b35b537e3fe264b53335821b6500f6f4d7464d14 Mon Sep 17 00:00:00 2001 From: Poorna Krishnamoorthy Date: Thu, 7 Jan 2021 15:28:27 -0800 Subject: [PATCH] Pass versionID to checkReplicateDelete in web handler (#11244) --- cmd/web-handlers.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/web-handlers.go b/cmd/web-handlers.go index 329a86e51..d9d7cd635 100644 --- a/cmd/web-handlers.go +++ b/cmd/web-handlers.go @@ -751,7 +751,7 @@ next: } if hasReplicationRules(ctx, args.BucketName, []ObjectToDelete{{ObjectName: objectName}}) || hasLifecycleConfig { goi, gerr = getObjectInfoFn(ctx, args.BucketName, objectName, opts) - if _, replicateDel = checkReplicateDelete(ctx, args.BucketName, ObjectToDelete{ObjectName: objectName}, goi, gerr); replicateDel { + if _, replicateDel = checkReplicateDelete(ctx, args.BucketName, ObjectToDelete{ObjectName: objectName, VersionID: goi.VersionID}, goi, gerr); replicateDel { opts.DeleteMarkerReplicationStatus = string(replication.Pending) opts.DeleteMarker = true } @@ -855,8 +855,8 @@ next: } } } + _, replicateDel := checkReplicateDelete(ctx, args.BucketName, ObjectToDelete{ObjectName: obj.Name, VersionID: obj.VersionID}, obj, nil) // since versioned delete is not available on web browser, yet - this is a simple DeleteMarker replication - _, replicateDel := checkReplicateDelete(ctx, args.BucketName, ObjectToDelete{ObjectName: obj.Name}, obj, nil) objToDel := ObjectToDelete{ObjectName: obj.Name} if replicateDel { objToDel.DeleteMarkerReplicationStatus = string(replication.Pending)