dims        01/08/31 08:49:35

  Modified:    src/org/apache/cocoon/generation DirectoryGenerator.java
  Log:
  Patch from Stuart Roebuck <[EMAIL PROTECTED]> for "DirectoryGenerator.java 
- Not resolving filepaths"
  
  Revision  Changes    Path
  1.13      +4 -2      
xml-cocoon2/src/org/apache/cocoon/generation/DirectoryGenerator.java
  
  Index: DirectoryGenerator.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/org/apache/cocoon/generation/DirectoryGenerator.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DirectoryGenerator.java   2001/08/25 19:40:32     1.12
  +++ DirectoryGenerator.java   2001/08/31 15:49:35     1.13
  @@ -21,6 +21,7 @@
   
   import java.io.File;
   import java.io.IOException;
  +import java.net.URL;
   import java.text.SimpleDateFormat;
   import java.util.Date;
   import java.util.Map;
  @@ -61,7 +62,7 @@
    *         (Apache Software Foundation, Exoffice Technologies)
    * @author <a href="mailto:[EMAIL PROTECTED]";>Conny Krappatsch</a>
    *         (SMB GmbH) for Virbus AG
  - * @version CVS $Revision: 1.12 $ $Date: 2001/08/25 19:40:32 $ */
  + * @version CVS $Revision: 1.13 $ $Date: 2001/08/31 15:49:35 $ */
   
   public class DirectoryGenerator extends ComposerGenerator implements Recyclable {
     private static final String FILE = "file:";
  @@ -168,7 +169,8 @@
               if (!systemId.startsWith(FILE)) {
                 throw new ResourceNotFoundException(systemId + " does not denote a 
directory");
               }
  -            File directoryFile = new File(directory);
  +            // This relies on systemId being of the form "file://..."
  +            File directoryFile = new File(new URL(systemId).getFile());
               if (!directoryFile.isDirectory()) {
                   throw new ResourceNotFoundException(directory + " is not a 
directory.");
               }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to