diff options
Diffstat (limited to 'services/release/release.go')
-rw-r--r-- | services/release/release.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/release/release.go b/services/release/release.go index 2fc3cb199b..c308c19f24 100644 --- a/services/release/release.go +++ b/services/release/release.go @@ -6,7 +6,6 @@ package release import ( "fmt" - "os" "strings" "code.gitea.io/gitea/models" @@ -15,6 +14,7 @@ import ( "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/repository" "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 := os.RemoveAll(attachment.LocalPath()); err != nil { + if err := util.RemoveAll(attachment.LocalPath()); err != nil { log.Error("Delete attachment %s of release %s failed: %v", attachment.UUID, rel.ID, err) } } |