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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]