summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/release/release.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/release/release.go b/services/release/release.go
index c308c19f24..c36e2126ed 100644
--- a/services/release/release.go
+++ b/services/release/release.go
@@ -13,8 +13,8 @@ import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/notification"
"code.gitea.io/gitea/modules/repository"
+ "code.gitea.io/gitea/modules/storage"
"code.gitea.io/gitea/modules/timeutil"
- "code.gitea.io/gitea/modules/util"
)
func createTag(gitRepo *git.Repository, rel *models.Release) error {
@@ -168,7 +168,7 @@ func DeleteReleaseByID(id int64, doer *models.User, delTag bool) error {
for i := range rel.Attachments {
attachment := rel.Attachments[i]
- if err := util.RemoveAll(attachment.LocalPath()); err != nil {
+ if err := storage.Attachments.Delete(attachment.RelativePath()); err != nil {
log.Error("Delete attachment %s of release %s failed: %v", attachment.UUID, rel.ID, err)
}
}