aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2006-03-01 10:41:04 +0000
committerJeremias Maerki <jeremias@apache.org>2006-03-01 10:41:04 +0000
commit7f9eeb6971087e7381b3566c89c05fe75b45690d (patch)
tree339600c770521c376711dcf3e6e64edab3991347
parent07c8f8ab1df6d80710a61a61439a9220a052a7a0 (diff)
downloadxmlgraphics-fop-7f9eeb6971087e7381b3566c89c05fe75b45690d.tar.gz
xmlgraphics-fop-7f9eeb6971087e7381b3566c89c05fe75b45690d.zip
Ported the latest bugfix in FOUserAgent to branch:
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
-rw-r--r--src/java/org/apache/fop/apps/FopFactory.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/apps/FopFactory.java b/src/java/org/apache/fop/apps/FopFactory.java
index 75d2902b9..ef895d26b 100644
--- a/src/java/org/apache/fop/apps/FopFactory.java
+++ b/src/java/org/apache/fop/apps/FopFactory.java
@@ -459,10 +459,7 @@ public class FopFactory {
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);