Check for Windows path before creating URI to prevent URISyntaxExecption

This commit is contained in:
Silvio Fiorito 2016-03-01 19:43:56 -05:00
parent d30e4b9819
commit c700808b78

View file

@ -60,7 +60,11 @@ public class VFSNotebookRepo implements NotebookRepo {
this.conf = conf;
try {
filesystemRoot = new URI(conf.getNotebookDir());
if (conf.isWindowsPath(conf.getNotebookDir())) {
filesystemRoot = new File(conf.getNotebookDir()).toURI();
} else {
filesystemRoot = new URI(conf.getNotebookDir());
}
} catch (URISyntaxException e1) {
throw new IOException(e1);
}
@ -72,9 +76,8 @@ public class VFSNotebookRepo implements NotebookRepo {
} catch (URISyntaxException e) {
throw new IOException(e);
}
} else {
this.filesystemRoot = filesystemRoot;
}
fsManager = VFS.getManager();
}