cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation FileWritingTransformer.java
Date Wed, 20 Feb 2002 13:59:16 GMT
cziegeler    02/02/20 05:59:16

  Modified:    src/scratchpad/src/org/apache/cocoon/transformation
                        FileWritingTransformer.java
  Log:
  Fixed FileWriterTransformer
  
  Revision  Changes    Path
  1.4       +2 -1      xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/FileWritingTransformer.java
  
  Index: FileWritingTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/src/org/apache/cocoon/transformation/FileWritingTransformer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FileWritingTransformer.java	20 Feb 2002 10:39:24 -0000	1.3
  +++ FileWritingTransformer.java	20 Feb 2002 13:59:16 -0000	1.4
  @@ -288,10 +288,11 @@
                           File file = new File (this.target.substring(5));
                           try {
                               if (!file.exists()) {
  -                                File dir = new File (this.target.substring(5, this.target.lastIndexOf(File.separatorChar)));
  +                                File dir = file.getParentFile();
                                   if (!dir.exists() && dir.mkdirs() == true) {
                                       getLogger().warn("FileWritingTransformer: made new
directories: " + dir.toString());
                                   }
  +                                file = new File (this.target.substring(5));
                                   this.action = FRT_ACTION_NEW;
                               } else if (file.isDirectory()) {
                                   getLogger().error("FileWritingTransformer failed, the src
parameter cannot point to a directory");
  
  
  

----------------------------------------------------------------------
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


Mime
View raw message