lifecycle: Set opts.VersionSuspended when expiring objects (#14902)

This commit is contained in:
Krishnan Parthasarathi 2022-05-12 06:09:24 -07:00 committed by GitHub
parent 74285d50c4
commit 88dd83a365
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1185,6 +1185,7 @@ func applyExpiryOnNonTransitionedObjects(ctx context.Context, objLayer ObjectLay
}
if opts.VersionID == "" {
opts.Versioned = globalBucketVersioningSys.PrefixEnabled(obj.Bucket, obj.Name)
opts.VersionSuspended = globalBucketVersioningSys.PrefixSuspended(obj.Bucket, obj.Name)
}
obj, err := objLayer.DeleteObject(ctx, obj.Bucket, obj.Name, opts)