avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/io FileUtil.java
Date Sun, 24 Feb 2002 04:18:20 GMT
donaldp     02/02/23 20:18:20

  Modified:    src/java/org/apache/avalon/excalibur/io FileUtil.java
  Log:
  Make sure copy creates the parent dirs if they don't exist. Previously it was creating a
destination dir with the same name as file writing to which would cause an error.
  
  Submitted By: "Paul Balmee" <pbaleme@whoever.com>
  
  Revision  Changes    Path
  1.21      +3 -3      jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/io/FileUtil.java
  
  Index: FileUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/io/FileUtil.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- FileUtil.java	17 Feb 2002 09:12:48 -0000	1.20
  +++ FileUtil.java	24 Feb 2002 04:18:20 -0000	1.21
  @@ -45,7 +45,7 @@
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
    * @author <a href="mailto:jefft@apache.org">Jeff Turner</a>
  - * @version CVS $Revision: 1.20 $ $Date: 2002/02/17 09:12:48 $
  + * @version CVS $Revision: 1.21 $ $Date: 2002/02/24 04:18:20 $
    * @since 4.0
    */
   public final class FileUtil
  @@ -367,7 +367,7 @@
           if( destination.getParentFile() != null &&
               !destination.getParentFile().exists() )
           {
  -            destination.mkdirs();
  +            destination.getParentFile().mkdirs();
           }
   
           //make sure we can write to destination
  @@ -415,7 +415,7 @@
           if( destination.getParentFile() != null &&
               !destination.getParentFile().exists() )
           {
  -            destination.mkdirs();
  +            destination.getParentFile().mkdirs();
           }
   
           //make sure we can write to destination
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message