Return-Path: Delivered-To: apmail-xml-cocoon-cvs-archive@xml.apache.org Received: (qmail 56839 invoked by uid 500); 5 Aug 2001 16:56:49 -0000 Mailing-List: contact cocoon-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: cocoon-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cocoon-cvs@xml.apache.org Received: (qmail 56830 invoked by uid 500); 5 Aug 2001 16:56:49 -0000 Delivered-To: apmail-xml-cocoon2-cvs@apache.org Date: 5 Aug 2001 16:55:37 -0000 Message-ID: <20010805165537.17805.qmail@icarus.apache.org> From: vgritsenko@apache.org To: xml-cocoon2-cvs@apache.org Subject: cvs commit: xml-cocoon2/src/org/apache/cocoon/components/url URLFactoryImpl.java X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N vgritsenko 01/08/05 09:55:37 Modified: src/org/apache/cocoon/components/url URLFactoryImpl.java Log: Make 'file:' protocol url always have '/' Revision Changes Path 1.6 +8 -2 xml-cocoon2/src/org/apache/cocoon/components/url/URLFactoryImpl.java Index: URLFactoryImpl.java =================================================================== RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/components/url/URLFactoryImpl.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- URLFactoryImpl.java 2001/07/13 11:25:00 1.5 +++ URLFactoryImpl.java 2001/08/05 16:55:37 1.6 @@ -29,7 +29,7 @@ /** * @author Giacomo Pati - * @version $Id: URLFactoryImpl.java,v 1.5 2001/07/13 11:25:00 cziegeler Exp $ + * @version $Id: URLFactoryImpl.java,v 1.6 2001/08/05 16:55:37 vgritsenko Exp $ */ public class URLFactoryImpl extends AbstractLoggable implements URLFactory, Component, Configurable, Contextualizable { @@ -95,7 +95,13 @@ if ( base != null ) { if (base.getProtocol().equals("file")) { File temp = new File(base.toExternalForm().substring("file:".length()), location); - return getURL("file:" + temp.getAbsolutePath()); + String path = temp.getAbsolutePath(); + // VG: M$ paths starts with drive letter + if (path.charAt(0) != File.separator.charAt(0)) { + return getURL("file:/" + path); + } else { + return getURL("file:" + path); + } } return getURL(new URL(base, location).toExternalForm()); ---------------------------------------------------------------------- In case of troubles, e-mail: webmaster@xml.apache.org To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: cocoon-cvs-help@xml.apache.org