mirror of
https://github.com/gogs/gogs.git
synced 2026-05-07 20:37:27 +02:00
Replace github.com/unknwon/com with stdlib and internal helpers (#8148)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Joe Chen <jc@unknwon.io> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
||||
"github.com/go-macaron/session"
|
||||
"github.com/go-macaron/toolbox"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"github.com/unknwon/com"
|
||||
"github.com/urfave/cli"
|
||||
"gopkg.in/macaron.v1"
|
||||
log "unknwon.dev/clog/v2"
|
||||
@@ -308,7 +307,7 @@ func runWeb(c *cli.Context) error {
|
||||
if err != nil {
|
||||
c.NotFoundOrError(err, "get attachment by UUID")
|
||||
return
|
||||
} else if !com.IsFile(attach.LocalPath()) {
|
||||
} else if !osutil.IsFile(attach.LocalPath()) {
|
||||
c.NotFound()
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user