Skip to content

Commit

Permalink
Minor tweak.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Apr 5, 2022
1 parent b0739fd commit 5ef06b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/service/s3/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ func deletePageOfObjectVersions(ctx context.Context, conn *s3.S3, bucket string,
continue
}

key := aws.StringValue(v.Key)
versionID := aws.StringValue(v.VersionId)

// Attempt to remove any legal hold on the object.
if force && code == ErrCodeAccessDenied {
key := aws.StringValue(v.Key)
versionID := aws.StringValue(v.VersionId)

_, err := conn.PutObjectLegalHoldWithContext(ctx, &s3.PutObjectLegalHoldInput{
Bucket: aws.String(bucket),
Key: aws.String(key),
Expand Down

0 comments on commit 5ef06b1

Please sign in to comment.