mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
enforce explanation for necessary nolints and fix bugs (#34883)
Follows up https://github.com/go-gitea/gitea/pull/34851 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
package v1_11
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
|
||||
@@ -31,7 +31,7 @@ func RemoveAttachmentMissedRepo(x *xorm.Engine) error {
|
||||
for i := 0; i < len(attachments); i++ {
|
||||
uuid := attachments[i].UUID
|
||||
if err = util.RemoveAll(filepath.Join(setting.Attachment.Storage.Path, uuid[0:1], uuid[1:2], uuid)); err != nil {
|
||||
fmt.Printf("Error: %v", err) //nolint:forbidigo
|
||||
log.Warn("Unable to remove attachment file by UUID %s: %v", uuid, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user