commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan McKinley <ryan...@gmail.com>
Subject [VFS] trunk UriParser.normalisePath() problem for resolveFile?
Date Tue, 29 Jan 2013 22:56:26 GMT
Hello-

I am using trunk VFS and hitting an error when trying to resolve files.
 This simple example demonstrates the problem:

FileObject root = VFS.getManager().resolveFile( "
ftp://atlas.ca.gov/pub/casil/" );
FileObject file = root.resolveFile("
ftp://atlas.ca.gov/pub/casil/transportation/README");

This gets an error:
org.apache.commons.vfs2.FileSystemException: Expecting // to follow the
scheme in URI "ftp:/atlas.ca.gov/pub/casil/transportation/README".

The javadoc on resolveFile says the path can be absolute or relative.

Digging into things, the issue seems to be in:

DefaultFileSystemManager#resolveName

This calls:
UriParser.normalisePath(buffer);

removing the second slash from :// and making an invalid path.

Am I doing something wrong, or is this expected?

thanks
Ryan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message