From: James Moger Date: Fri, 29 Mar 2013 15:14:42 +0000 (-0400) Subject: Fixed regression with individually symlinked repositories (issue 217) X-Git-Tag: v1.3.0~211 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ea4769096f9f303964107e2c3d95c63857588fc5;p=gitblit.git Fixed regression with individually symlinked repositories (issue 217) --- diff --git a/releases.moxie b/releases.moxie index 05989142..37200e42 100644 --- a/releases.moxie +++ b/releases.moxie @@ -15,6 +15,7 @@ r17: { - Fixed incorrect icon file name for .doc files (issue 200) - Do not queue emails with no recipients (issue 201) - Disable view and blame links for deleted blobs (issue 216) + - Fixed 1.2.x regression with individually symlinked repositories (issue 217) - Fixed NPE in 1.2.1 Federation Client (issue 219) - Fixed extracting Groovy scripts on Express installs (issue 220) - Ensure Redmine url is properly formatted (issue 223) diff --git a/src/main/java/com/gitblit/GitBlit.java b/src/main/java/com/gitblit/GitBlit.java index 7c6a5350..65dc559c 100644 --- a/src/main/java/com/gitblit/GitBlit.java +++ b/src/main/java/com/gitblit/GitBlit.java @@ -1656,6 +1656,11 @@ public class GitBlit implements ServletContextListener { } else { model.name = com.gitblit.utils.FileUtils.getRelativePath(basePath, r.getDirectory().getParentFile()); } + if (StringUtils.isEmpty(model.name)) { + // Repository is NOT located relative to the base folder because it + // is symlinked. Use the provided repository name. + model.name = repositoryName; + } model.hasCommits = JGitUtils.hasCommits(r); model.lastChange = JGitUtils.getLastChange(r); model.projectPath = StringUtils.getFirstPathElement(repositoryName);