You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by sc...@apache.org on 2012/07/11 03:59:54 UTC

svn commit: r1359986 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/startup/ExpandWar.java

Author: schultz
Date: Wed Jul 11 01:59:54 2012
New Revision: 1359986

URL: http://svn.apache.org/viewvc?rev=1359986&view=rev
Log:
Back-port of change to ExpandWar.expand to check return value of docBase.mkdir.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ExpandWar.java

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1359981

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ExpandWar.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ExpandWar.java?rev=1359986&r1=1359985&r2=1359986&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ExpandWar.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ExpandWar.java Wed Jul 11 01:59:54 2012
@@ -96,7 +96,8 @@ public class ExpandWar {
         }
 
         // Create the new document base directory
-        docBase.mkdir();
+        if(!docBase.mkdir() && !docBase.isDirectory())
+            throw new IOException(sm.getString("expandWar.createFailed", docBase));
 
         // Expand the WAR into the new document base directory
         String canonicalDocBasePrefix = docBase.getCanonicalPath();



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org