From 424d538254afb06646869ed528e1b9d448db5b99 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 1 Mar 2006 10:34:14 +0000 Subject: 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/trunk@381978 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/apps/FOUserAgent.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/java/org/apache/fop/apps/FOUserAgent.java b/src/java/org/apache/fop/apps/FOUserAgent.java index 203f7f951..a10692890 100644 --- a/src/java/org/apache/fop/apps/FOUserAgent.java +++ b/src/java/org/apache/fop/apps/FOUserAgent.java @@ -434,10 +434,7 @@ public class FOUserAgent { 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); -- cgit v1.2.3