From 07f97d76e46163ce74713b9bcbd7767791e9846d Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Wed, 22 Mar 2006 11:32:04 +0000 Subject: [PATCH] INTEGRATION: CWS jaxpapifixer (1.3.4); FILE MERGED 2006/03/21 17:45:06 ihi 1.3.4.1: #i63339# Windows toURL() build fix --- .../org/openoffice/configuration/FileHelper.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/officecfg/org/openoffice/configuration/FileHelper.java b/officecfg/org/openoffice/configuration/FileHelper.java index f5b18eb79fb8..f72dfbdda81a 100644 --- a/officecfg/org/openoffice/configuration/FileHelper.java +++ b/officecfg/org/openoffice/configuration/FileHelper.java @@ -4,9 +4,9 @@ * * $RCSfile: FileHelper.java,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: vg $ $Date: 2006-03-16 11:12:44 $ + * last change: $Author: obo $ $Date: 2006-03-22 12:32:04 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -62,8 +62,12 @@ public class FileHelper extends Object File aFile = new File(sSource); try { - absPath = "file://" + sSource.replace('\\','/'); - + absPath = aFile.toURL().toString(); + // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6351751 + if (absPath.substring(0, 5) == "file:" && absPath.substring(5, 7) != "//") + absPath = "file://" + absPath.substring(5, absPath.length()); + if (absPath.charAt(absPath.length()-1) == '/') + absPath = absPath.substring(0, absPath.length()-1); } catch (Exception e) { e.printStackTrace();