Re-fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49978
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 29 Jan 2011 00:00:50 +0000 (00:00 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 29 Jan 2011 00:00:50 +0000 (00:00 +0000)
Pre-existing dir should not break deployment

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

java/org/apache/catalina/loader/WebappLoader.java
webapps/docs/changelog.xml

index 1973478..446c1dc 100644 (file)
@@ -1128,7 +1128,7 @@ public class WebappLoader extends LifecycleMBeanBase
                     if (!copy((InputStream) object, os))
                         return false;
                 } else if (object instanceof DirContext) {
-                    if (!currentFile.mkdir())
+                    if (!currentFile.isDirectory() && !currentFile.mkdir())
                         return false;
                     if (!copyDir((DirContext) object, currentFile))
                         return false;
index 6db9f51..07719b1 100644 (file)
         context attribute is set to "true". (schultz)
       </fix>
       <fix>
+        <bug>49978</bug>: Correct another instance where deployment incorrectly
+        failed if a directory in the work area already existed. (markt)
+      </fix>
+      <fix>
         <bug>50582</bug>: Refactor access logging so chunked encoding is not
         forced for all requests if bytes sent is logged. (markt)
       </fix>