summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-04-07 06:01:36 +0800
committerGitHub <noreply@github.com>2023-04-06 18:01:36 -0400
commite5dcd6aada56991feaab5054dfe7ea4d960946d4 (patch)
treed972f84ca244df19801f51c033f1bb2259547a22
parent6e346f84c1cd015edec9b491c05017cf29fe7c1e (diff)
downloadgitea-e5dcd6aada56991feaab5054dfe7ea4d960946d4.tar.gz
gitea-e5dcd6aada56991feaab5054dfe7ea4d960946d4.zip
Delete deleted release attachments immediately from storage (#23913)
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
-rw-r--r--services/release/release.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/release/release.go b/services/release/release.go
index eec03b4688..a9a5231197 100644
--- a/services/release/release.go
+++ b/services/release/release.go
@@ -227,7 +227,7 @@ func UpdateRelease(doer *user_model.User, gitRepo *git.Repository, rel *repo_mod
deletedUUIDs.Add(attach.UUID)
}
- if _, err := repo_model.DeleteAttachments(ctx, attachments, false); err != nil {
+ if _, err := repo_model.DeleteAttachments(ctx, attachments, true); err != nil {
return fmt.Errorf("DeleteAttachments [uuids: %v]: %w", delAttachmentUUIDs, err)
}
}