Fix bug in the construction of a base URL when it's specified as a file system path.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_API_Finalization@381982
13f79535-47bb-0310-9956-
ffa450edef68
if (cfgBaseDir != null) {
File dir = new File(cfgBaseDir);
if (dir.isDirectory()) {
- cfgBaseDir = "file://" + dir.getCanonicalPath()
- + System.getProperty("file.separator");
- cfgBaseDir = cfgBaseDir.replace(
- System.getProperty("file.separator").charAt(0), '/');
+ cfgBaseDir = dir.toURL().toExternalForm();
} else {
//The next statement is for validation only
new URL(cfgBaseDir);