Author: kkolinko
Date: Fri Oct  2 10:39:21 2009
New Revision: 820954

URL: http://svn.apache.org/viewvc?rev=820954&view=rev
Log:
Use proper method to construct an URL string.
File.toURI() takes care of absolute paths, trailing slashes in the names of 
directories, encoding of special characters such as '%'.
Based on a suggestion by Rainer Jung.

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

Modified: tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java?rev=820954&r1=820953&r2=820954&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java Fri 
Oct  2 10:39:21 2009
@@ -91,11 +91,7 @@
             if (!file.exists()) {
                 continue;
             }
-            if (file.isDirectory()) {
-                addRepository("file:/" + file.getAbsolutePath() + "/");
-            } else {
-                addRepository("file:/" + file.getAbsolutePath());
-            }
+            addRepository(file.toURI().toString());
         }
 
         super.start();



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

Reply via email to