You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by im...@apache.org on 2005/08/18 07:57:40 UTC

svn commit: r233289 - /jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/LayeredFileNameParser.java

Author: imario
Date: Wed Aug 17 22:57:35 2005
New Revision: 233289

URL: http://svn.apache.org/viewcvs?rev=233289&view=rev
Log:
fix: allow layered filenames without "!" in their name. e.g. zip:/to/zip/file.zip

Modified:
    jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/LayeredFileNameParser.java

Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/LayeredFileNameParser.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/LayeredFileNameParser.java?rev=233289&r1=233288&r2=233289&view=diff
==============================================================================
--- jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/LayeredFileNameParser.java (original)
+++ jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/LayeredFileNameParser.java Wed Aug 17 22:57:35 2005
@@ -73,6 +73,13 @@
         {
         }
 
+        if (pos == 0 && uri.charAt(pos) != '!')
+        {
+            // not ! found, so take the whole path a root
+            // e.g. zip:/my/zip/file.zip
+            pos = maxlen;
+        }
+
         // Extract the name
         String prefix = uri.substring(0, pos);
         if (pos < maxlen)



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org