From: James Moger Date: Wed, 24 Sep 2014 17:46:12 +0000 (-0400) Subject: Fix GITBLIT_HOME environment variable baseFolder support X-Git-Tag: v1.6.1~27^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4b9b3c972681db34b63e94f3df51627c2da62cf3;p=gitblit.git Fix GITBLIT_HOME environment variable baseFolder support --- diff --git a/src/main/java/com/gitblit/servlet/GitblitContext.java b/src/main/java/com/gitblit/servlet/GitblitContext.java index fcc702bb..64d68e77 100644 --- a/src/main/java/com/gitblit/servlet/GitblitContext.java +++ b/src/main/java/com/gitblit/servlet/GitblitContext.java @@ -317,9 +317,9 @@ public class GitblitContext extends DaggerContext { logger.error(""); } - String baseFromJndi = lookupBaseFolderFromJndi(); - if (!StringUtils.isEmpty(baseFromJndi)) { - path = baseFromJndi; + String externalBase = System.getProperty("GITBLIT_HOME", lookupBaseFolderFromJndi()); + if (!StringUtils.isEmpty(externalBase)) { + path = externalBase; } File base = com.gitblit.utils.FileUtils.resolveParameter(Constants.contextFolder$, contextFolder, path);