Skip to content

Commit 001d3fb

Browse files
GiteaBotlunny
andauthored
Delete deleted release attachments immediately from storage (#23913) (#23958)
Backport #23913 by @lunny Previously, deleted release attachments were kept forever on the external storage. Note: It may be very slow now if there are many attachments to be deleted on this release. Fix #23728 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 parent 8092251 commit 001d3fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/release/release.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ func UpdateRelease(doer *user_model.User, gitRepo *git.Repository, rel *repo_mod
227227
deletedUUIDs.Add(attach.UUID)
228228
}
229229

230-
if _, err := repo_model.DeleteAttachments(ctx, attachments, false); err != nil {
230+
if _, err := repo_model.DeleteAttachments(ctx, attachments, true); err != nil {
231231
return fmt.Errorf("DeleteAttachments [uuids: %v]: %w", delAttachmentUUIDs, err)
232232
}
233233
}

0 commit comments

Comments
 (0)