Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42678
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 10 Jul 2008 17:01:23 +0000 (17:01 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 10 Jul 2008 17:01:23 +0000 (17:01 +0000)
Only ignore docBase it it really is a subdir of appBase
Patch provided by juergen

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

java/org/apache/catalina/startup/HostConfig.java

index a526de4..f54debc 100644 (file)
@@ -608,7 +608,8 @@ public class HostConfig
                     docBase = new File(appBase(), context.getDocBase());
                 }
                 // If external docBase, register .xml as redeploy first
-                if (!docBase.getCanonicalPath().startsWith(appBase().getAbsolutePath())) {
+                if (!docBase.getCanonicalPath().startsWith(
+                        appBase().getAbsolutePath() + File.separator)) {
                     isExternal = true;
                     deployedApp.redeployResources.put
                         (contextXml.getAbsolutePath(), new Long(contextXml.lastModified()));