Fix bug 43117. Setting an empty workDir can delete all of CATALINA_HOME.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 3 May 2008 19:49:57 +0000 (19:49 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 3 May 2008 19:49:57 +0000 (19:49 +0000)
Patch provided by Takayuki Kaneko.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@653113 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/StandardContext.java

index c7789ac..ef8e67f 100644 (file)
@@ -4954,7 +4954,7 @@ public class StandardContext
 
         // Acquire (or calculate) the work directory path
         String workDir = getWorkDir();
-        if (workDir == null) {
+        if (workDir == null || workDir.length() == 0) {
 
             // Retrieve our parent (normally a host) name
             String hostName = null;