summaryrefslogtreecommitdiffstats
path: root/modules/context/repo.go
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-12-06 17:09:02 -0800
committerLunny Xiao <xiaolunwen@gmail.com>2017-12-07 09:09:02 +0800
commit54907dfbd198628a2da18b8e1f350dd4e4f54514 (patch)
tree467826428d89cbf08ea038fb103e9403c245d14e /modules/context/repo.go
parent469ab99e9a4e31c1e95ab37f363c26b62b782542 (diff)
downloadgitea-54907dfbd198628a2da18b8e1f350dd4e4f54514.tar.gz
gitea-54907dfbd198628a2da18b8e1f350dd4e4f54514.zip
Fix legacy URL redirects (#3100)
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r--modules/context/repo.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go
index 66250a0f3e..7651d43fad 100644
--- a/modules/context/repo.go
+++ b/modules/context/repo.go
@@ -618,7 +618,11 @@ func RepoRefByType(refType RepoRefType) macaron.Handler {
if refType == RepoRefLegacy {
// redirect from old URL scheme to new URL scheme
- ctx.Redirect(path.Join(setting.AppSubURL, strings.TrimSuffix(ctx.Req.URL.String(), ctx.Params("*")), ctx.Repo.BranchNameSubURL()))
+ ctx.Redirect(path.Join(
+ setting.AppSubURL,
+ strings.TrimSuffix(ctx.Req.URL.String(), ctx.Params("*")),
+ ctx.Repo.BranchNameSubURL(),
+ ctx.Repo.TreePath))
return
}
}