mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Remove unnecassary calls to filepath.Join
(#17608)
- Partialy resolvess #17596 - Resolves `badCall` errors from go-critic `badCall: suspicious Join on 1 argument` - When only 1 argument is passed into `filepath.Join`, it won't do anything special other than `filepath.Clean(...)` will be applied over it. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
562785ef4e
commit
253d9e4158
4 changed files with 5 additions and 5 deletions
|
@ -27,7 +27,7 @@ func AdoptOrDeleteRepository(ctx *context.Context) {
|
|||
action := ctx.FormString("action")
|
||||
|
||||
ctxUser := ctx.User
|
||||
root := filepath.Join(models.UserPath(ctxUser.LowerName))
|
||||
root := models.UserPath(ctxUser.LowerName)
|
||||
|
||||
// check not a repo
|
||||
has, err := models.IsRepositoryExist(ctxUser, dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue