Author: imario Date: Thu Jul 27 05:46:37 2006 New Revision: 426050 URL: http://svn.apache.org/viewvc?rev=426050&view=rev Log: VFS-51 - fixed handling of rootFile for localFileSystem to make it correctly work again with temporary fileSystem
Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/local/LocalFile.java jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/local/LocalFileSystem.java Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/local/LocalFile.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/local/LocalFile.java?rev=426050&r1=426049&r2=426050&view=diff ============================================================================== --- jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/local/LocalFile.java (original) +++ jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/local/LocalFile.java Thu Jul 27 05:46:37 2006 @@ -41,15 +41,19 @@ extends AbstractFileObject implements FileObject { + private final String rootFile; + private File file; /** * Creates a non-root file. */ protected LocalFile(final LocalFileSystem fileSystem, + final String rootFile, final FileName name) throws FileSystemException { super(name, fileSystem); + this.rootFile = rootFile; } /** @@ -69,8 +73,8 @@ if (file == null) { // Remove the "file:///" - LocalFileName localFileName = (LocalFileName) getName(); - String fileName = localFileName.getRootFile() + getName().getPathDecoded(); + // LocalFileName localFileName = (LocalFileName) getName(); + String fileName = rootFile + getName().getPathDecoded(); // fileName = UriParser.decode(fileName); file = new File(fileName); } @@ -88,7 +92,7 @@ { return FileType.IMAGINARY; } - + if (file.isDirectory()) { return FileType.FOLDER; Modified: jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/local/LocalFileSystem.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/local/LocalFileSystem.java?rev=426050&r1=426049&r2=426050&view=diff ============================================================================== --- jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/local/LocalFileSystem.java (original) +++ jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/local/LocalFileSystem.java Thu Jul 27 05:46:37 2006 @@ -53,7 +53,7 @@ protected FileObject createFile(final FileName name) throws FileSystemException { // Create the file - return new LocalFile(this, name); + return new LocalFile(this, rootFile, name); } /** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]