Author: kkolinko
Date: Fri May 31 11:03:26 2013
New Revision: 1488151

URL: http://svn.apache.org/r1488151
Log:
(Reviewing r1485114)
Make antiLockingDocBase an absolute path.
It is very unlikely that java.io.tmpdir is not an absolute path. For 
consistency, convert it to the absolute form just once, so the path used when 
starting and stopping the webapp is certainly the same.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1488151&r1=1488150&r2=1488151&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Fri May 31 
11:03:26 2013
@@ -213,7 +213,8 @@ public class ContextConfig implements Li
 
 
     /**
-     * Anti-locking docBase
+     * Anti-locking docBase. It is a path to a copy of the web application
+     * in the java.io.tmpdir directory. This path is always an absolute one.
      */
     private File antiLockingDocBase = null;
 
@@ -736,17 +737,18 @@ public class ContextConfig implements Li
                         System.getProperty("java.io.tmpdir"),
                         deploymentCount++ + "-" + docBase);
             }
+            antiLockingDocBase = antiLockingDocBase.getAbsoluteFile();
 
             if (log.isDebugEnabled()) {
                 log.debug("Anti locking context[" + context.getName()
                         + "] setting docBase to " +
-                        antiLockingDocBase.getAbsolutePath());
+                        antiLockingDocBase.getPath());
             }
 
             // Cleanup just in case an old deployment is lying around
             ExpandWar.delete(antiLockingDocBase);
             if (ExpandWar.copy(docBaseFile, antiLockingDocBase)) {
-                context.setDocBase(antiLockingDocBase.getAbsolutePath());
+                context.setDocBase(antiLockingDocBase.getPath());
             }
         }
     }



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

Reply via email to