]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
sets baseDir to a URL string rather than a file path string
authorKeiron Liddle <keiron@apache.org>
Tue, 5 Jun 2001 12:55:18 +0000 (12:55 +0000)
committerKeiron Liddle <keiron@apache.org>
Tue, 5 Jun 2001 12:55:18 +0000 (12:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194271 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/apps/Options.java

index 60a5a4148c947cc34deabdcf4c245777b6edc9eb..6ed8322feadbaddff5d20045dde3f8cf01a2b258 100644 (file)
@@ -98,8 +98,11 @@ public class Options {
        //set base directory
         String baseDir = Configuration.getStringValue("baseDir");
         if (baseDir == null) {
-            baseDir = new File(clOptions.getInputFile().getAbsolutePath()).getParent();
-            Configuration.put("baseDir",baseDir);
+            try {
+                baseDir = new File(clOptions.getInputFile().getAbsolutePath()).getParentFile().toURL().toExternalForm();
+                Configuration.put("baseDir", baseDir);
+            } catch(Exception e) {
+            }
         }
         if (errorDump) {
             MessageHandler.logln("base directory: " + baseDir);