Skip to content

Commit

Permalink
MONDRIAN: Relative URLs and VFS.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 8410]
  • Loading branch information
julianhyde committed Dec 29, 2006
1 parent 69bd687 commit 2c578f7
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/main/mondrian/rolap/RolapSchema.java
Expand Up @@ -12,10 +12,7 @@
*/

package mondrian.rolap;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.*;
import java.lang.ref.SoftReference;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
Expand Down Expand Up @@ -261,7 +258,13 @@ protected void load(String catalogUrl, String catalogStr) {
throw Util.newError("Cannot get virtual file system manager");
}

FileObject file = fsManager.resolveFile(catalogUrl);
// Workaround VFS bug.
if (catalogUrl.startsWith("file:")) {
catalogUrl = catalogUrl.substring("file:".length());
}

File userDir = new File("").getAbsoluteFile();
FileObject file = fsManager.resolveFile(userDir, catalogUrl);
if (!file.isReadable()) {
throw Util.newError("Virtual file is not readable: " +
catalogUrl);
Expand Down

0 comments on commit 2c578f7

Please sign in to comment.