diff options
Diffstat (limited to 'models/attachment.go')
-rw-r--r-- | models/attachment.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/attachment.go b/models/attachment.go index 6c3996ff01..6215de95b5 100644 --- a/models/attachment.go +++ b/models/attachment.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/util" gouuid "github.com/google/uuid" "xorm.io/xorm" @@ -237,7 +238,7 @@ func DeleteAttachments(attachments []*Attachment, remove bool) (int, error) { if remove { for i, a := range attachments { - if err := os.Remove(a.LocalPath()); err != nil { + if err := util.Remove(a.LocalPath()); err != nil { return i, err } } |