mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 01:57:20 +00:00
enable staticcheck QFxxxx rules (#34064)
This commit is contained in:
@ -36,9 +36,10 @@ func PathJoinRel(elem ...string) string {
|
||||
elems[i] = path.Clean("/" + e)
|
||||
}
|
||||
p := path.Join(elems...)
|
||||
if p == "" {
|
||||
switch p {
|
||||
case "":
|
||||
return ""
|
||||
} else if p == "/" {
|
||||
case "/":
|
||||
return "."
|
||||
}
|
||||
return p[1:]
|
||||
|
Reference in New Issue
Block a user