tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1005457 - /tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java
Date Thu, 07 Oct 2010 14:13:44 GMT
Author: markt
Date: Thu Oct  7 14:13:44 2010
New Revision: 1005457

URL: http://svn.apache.org/viewvc?rev=1005457&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49978
Don't try to create directories that already exist

Modified:
    tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java

Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java?rev=1005457&r1=1005456&r2=1005457&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java (original)
+++ tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java Thu Oct  7 14:13:44 2010
@@ -884,9 +884,11 @@ public class WebappLoader extends Lifecy
             } else {
 
                 classRepository = new File(workDir, classesPath);
-                if (!classRepository.mkdirs())
-                    throw new IOException(
-                            sm.getString("webappLoader.mkdirFailure"));
+                if (!classRepository.isDirectory()) {
+                    if (!classRepository.mkdirs())
+                        throw new IOException(
+                                sm.getString("webappLoader.mkdirFailure"));
+                }
                 if (!copyDir(classes, classRepository)) {
                     throw new IOException(
                             sm.getString("webappLoader.copyFailure"));
@@ -934,9 +936,11 @@ public class WebappLoader extends Lifecy
             } else {
                 copyJars = true;
                 destDir = new File(workDir, libPath);
-                if (!destDir.mkdirs())
-                    throw new IOException(
-                            sm.getString("webappLoader.mkdirFailure"));
+                if (!destDir.isDirectory()) {
+                    if (!destDir.mkdirs())
+                        throw new IOException(
+                                sm.getString("webappLoader.mkdirFailure"));
+                }
             }
 
             // Looking up directory /WEB-INF/lib in the context



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


Mime
View raw message