From ea4769096f9f303964107e2c3d95c63857588fc5 Mon Sep 17 00:00:00 2001 From: James Moger Date: Fri, 29 Mar 2013 11:14:42 -0400 Subject: [PATCH] Fixed regression with individually symlinked repositories (issue 217) --- releases.moxie | 1 + src/main/java/com/gitblit/GitBlit.java | 5 +++++ 2 files changed, 6 insertions(+) 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); -- 2.39.5