openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1841048 - /openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
Date Mon, 17 Sep 2018 07:43:27 GMT
Author: struberg
Date: Mon Sep 17 07:43:27 2018
New Revision: 1841048

URL: http://svn.apache.org/viewvc?rev=1841048&view=rev
Log:
MEECROWAVE-130 create tempdir in the configured location

and not always in base/temp

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java?rev=1841048&r1=1841047&r2=1841048&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
Mon Sep 17 07:43:27 2018
@@ -99,6 +99,7 @@ import org.apache.catalina.session.Stand
 import org.apache.catalina.startup.Catalina;
 import org.apache.catalina.startup.MeecrowaveContextConfig;
 import org.apache.catalina.startup.Tomcat;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.text.StrLookup;
 import org.apache.commons.text.StrSubstitutor;
 import org.apache.coyote.http2.Http2Protocol;
@@ -467,10 +468,18 @@ public class Meecrowave implements AutoC
             final File conf = createDirectory(base, "conf");
             createDirectory(base, "lib");
             createDirectory(base, "logs");
-            createDirectory(base, "temp");
             createDirectory(base, "work");
             createDirectory(base, "webapps");
 
+            if (StringUtils.isEmpty(configuration.getTempDir())) {
+                createDirectory(base, "temp");
+            } else {
+                File tempDir = new File(configuration.getTempDir());
+                if (!tempDir.exists()) {
+                    tempDir.mkdirs();
+                }
+            }
+
             synchronize(conf, configuration.conf);
         }
 



Mime
View raw message