]> source.dussan.org Git - gitblit.git/commitdiff
Tweak reading war setting overrides
authorJames Moger <james.moger@gitblit.com>
Thu, 6 Dec 2012 22:04:17 +0000 (17:04 -0500)
committerJames Moger <james.moger@gitblit.com>
Thu, 6 Dec 2012 22:04:17 +0000 (17:04 -0500)
src/com/gitblit/GitBlit.java

index c2d4a85a42204230f7022d9f7611a9acf4cea1bd..46b0d406668ff95171f0991c1ef7bd9501e634ba 100644 (file)
@@ -3044,22 +3044,20 @@ public class GitBlit implements ServletContextListener {
                        ServletContext context = contextEvent.getServletContext();\r
                        WebXmlSettings webxmlSettings = new WebXmlSettings(context);\r
 \r
-                       // 0.7.0 web.properties in the deployed war folder\r
-                       String webProps = context.getRealPath("/WEB-INF/web.properties");\r
+                       // gitblit.properties file located within the webapp\r
+                       String webProps = context.getRealPath("/WEB-INF/gitblit.properties");\r
                        if (!StringUtils.isEmpty(webProps)) {\r
                                File overrideFile = new File(webProps);\r
-                               if (overrideFile.exists()) {\r
-                                       webxmlSettings.applyOverrides(overrideFile);\r
-                               }\r
+                               webxmlSettings.applyOverrides(overrideFile);\r
                        }\r
                        \r
-\r
-                       // 0.8.0 gitblit.properties file located outside the deployed war\r
+                       // gitblit.properties file located outside the deployed war\r
                        // folder lie, for example, on RedHat OpenShift.\r
                        File overrideFile = getFileOrFolder("gitblit.properties");\r
                        if (!overrideFile.getPath().equals("gitblit.properties")) {\r
                                webxmlSettings.applyOverrides(overrideFile);\r
                        }\r
+                       \r
                        configureContext(webxmlSettings, true);\r
 \r
                        // Copy the included scripts to the configured groovy folder\r