cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@locus.apache.org
Subject cvs commit: xml-stylebook/src/org/apache/stylebook/producers DirectoryProducer.java
Date Sun, 09 Jul 2000 12:44:22 GMT
rubys       00/07/09 05:44:22

  Modified:    src/org/apache/stylebook/producers DirectoryProducer.java
  Log:
  Support absolute paths on Unix
  
  Revision  Changes    Path
  1.3       +7 -4      xml-stylebook/src/org/apache/stylebook/producers/DirectoryProducer.java
  
  Index: DirectoryProducer.java
  ===================================================================
  RCS file: /home/cvs/xml-stylebook/src/org/apache/stylebook/producers/DirectoryProducer.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DirectoryProducer.java	2000/01/04 15:12:20	1.2
  +++ DirectoryProducer.java	2000/07/09 12:44:21	1.3
  @@ -25,7 +25,7 @@
    * @author <a href="mailto:pier@apache.org">Pierpaolo Fumagalli</a>
    * @author Copyright 1999 &copy; <a href="http://www.apache.org">The Apache
    *         Software Foundation</a>. All rights reserved.
  - * @version CVS $Revision: 1.2 $ $Date: 2000/01/04 15:12:20 $
  + * @version CVS $Revision: 1.3 $ $Date: 2000/07/09 12:44:21 $
    */
   public class DirectoryProducer extends AbstractComponent implements Producer {
       public Document produce(CreationContext c)
  @@ -82,9 +82,12 @@
                                               jarurl.getProtocol()+": protocol");
               jarname=jarurl.getFile();
               // Remove leading '/' chars from jar name and jar entry
  -            for(int x=0;x<jarname.length();x++) if (jarname.charAt(x)!='/') {
  -                jarname=jarname.substring(x);
  -                break;
  +            if (System.getProperty("path.separator").equals(";")) {
  +		// I believe that this is a workaround for a Windows JDK1.1 bug
  +                for(int x=0;x<jarname.length();x++) if (jarname.charAt(x)!='/') {
  +                    jarname=jarname.substring(x);
  +                    break;
  +                }
               }
               for(int x=0;x<dirname.length();x++) if (dirname.charAt(x)!='/') {
                   dirname=dirname.substring(x);
  
  
  

Mime
View raw message