From 27f0681863619b285d6979ac1d230a9e3716be7e Mon Sep 17 00:00:00 2001 From: Berke Viktor <github.bviktor@outlook.com> Date: Fri, 31 Oct 2014 15:04:34 -0400 Subject: [PATCH] Miscellaneous fixes to the Fedora service installer script --- src/main/java/com/gitblit/servlet/RawServlet.java | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gitblit/servlet/RawServlet.java b/src/main/java/com/gitblit/servlet/RawServlet.java index b11bed9..682e555 100644 --- a/src/main/java/com/gitblit/servlet/RawServlet.java +++ b/src/main/java/com/gitblit/servlet/RawServlet.java @@ -108,9 +108,8 @@ branch = Repository.shortenRefName(branch).replace('/', fsc); } - String encodedPath = path == null ? "" : path.replace(' ', '-'); - encodedPath = encodedPath.replace('/', fsc); - return baseURL + Constants.RAW_PATH + repository + "/" + (branch == null ? "" : (branch + "/" + (path == null ? "" : encodedPath))); + String encodedPath = path == null ? "" : path.replace('/', fsc); + return baseURL + Constants.RAW_PATH + repository + "/" + (branch == null ? "" : (branch + "/" + encodedPath)); } protected String getBranch(String repository, HttpServletRequest request) { @@ -176,7 +175,7 @@ } else { repository = path.substring(0, slash); } - offset += ( slash + 1 ); + offset = ( slash + 1 ); r = repositoryManager.getRepository(repository, false); if (repository.equals(path)) { // either only repository in url or no repository found -- Gitblit v1.9.1