diff --git a/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala b/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala index 1ba4290..680486f 100644 --- a/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala +++ b/src/main/scala/gitbucket/core/controller/RepositoryViewerController.scala @@ -523,10 +523,11 @@ /** * Displays the file find of branch. */ - get("/:owner/:repository/find/:ref")(referrersOnly { repository => + get("/:owner/:repository/find/*")(referrersOnly { repository => using(Git.open(getRepositoryDir(repository.owner, repository.name))){ git => - JGitUtil.getTreeId(git, params("ref")).map{ treeId => - html.find(params("ref"), + val ref = multiParams("splat").head + JGitUtil.getTreeId(git, ref).map{ treeId => + html.find(ref, treeId, repository, context.loginAccount match {