View | Details | Raw Unified | Return to bug 39013
Collapse All | Expand All

(-)trunk-orig/java/org/apache/catalina/startup/ContextConfig.java (-1 / +5 lines)
Lines 907-913 Link Here
907
            }
907
            }
908
        }
908
        }
909
909
910
        if (docBase.startsWith(canonicalAppBase.getPath())) {
910
        // Fix for Bugzilla 39013. A docBase that starts with the appBase
911
        // will be mangled. For example a docBase of 
912
        // "${catalina.home}/webapps-war/myapp" will otherwise be incorrectly
913
        // truncated to "-war/myapp".
914
        if ((docBase + "/").startsWith(canonicalAppBase.getPath() + "/")) {
911
            docBase = docBase.substring(canonicalAppBase.getPath().length());
915
            docBase = docBase.substring(canonicalAppBase.getPath().length());
912
            docBase = docBase.replace(File.separatorChar, '/');
916
            docBase = docBase.replace(File.separatorChar, '/');
913
            if (docBase.startsWith("/")) {
917
            if (docBase.startsWith("/")) {

Return to bug 39013