ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs FixCRLF.java
Date Tue, 24 Jun 2003 08:44:02 GMT
bodewig     2003/06/24 01:44:02

  Modified:    .        WHATSNEW
               src/main/org/apache/tools/ant/taskdefs FixCRLF.java
  Log:
  Create parent directories for destination files if they are missing.
  
  PR: 20840
  
  Revision  Changes    Path
  1.442     +9 -4      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.441
  retrieving revision 1.442
  diff -u -r1.441 -r1.442
  --- WHATSNEW	23 Jun 2003 14:56:31 -0000	1.441
  +++ WHATSNEW	24 Jun 2003 08:44:02 -0000	1.442
  @@ -109,8 +109,8 @@
   * The <replacetokens> filter would throw an exception if the token's
     value was an empty string.  Bugzilla Report 18625.
   
  -* Perforce tasks relying on output from the server such as <p4change> and <p4label>
  -  were hanging. Bugzilla Reports 18129 and 18956.
  +* Perforce tasks relying on output from the server such as <p4change>
  +  and <p4label> were hanging. Bugzilla Reports 18129 and 18956.
   
   * build.sh install had a problem on cygwin (with REALANTHOME).
     Bugzilla Report 17257
  @@ -121,7 +121,8 @@
   * file names that include spaces need to be quoted inside the @argfile
     argument using forked <javac> and (all JDKS).  Bugzilla Report 10499.
     NB : a first correction was only introducing quotes for JDK 1.4
  -  It has been changed to quote for all external compilers when paths contain spaces.
  +  It has been changed to quote for all external compilers when paths
  +  contain spaces.
     Also the backslashes need to be converted to forward slashes 
     Bugzilla Report 17683.
   
  @@ -168,6 +169,9 @@
   * <unzip>'s and <untar>'s nested patternsets didn't work as documented
     when the pattern ended in a slash or backslash.  Bugzilla Report 20969.
   
  +* <fixcrlf> will now create the parent directories for the destination
  +  files if necessary.  Bugzilla Report 20840.
  +
   Other changes:
   --------------
   * Six new Clearcase tasks added.
  @@ -424,7 +428,8 @@
     if ejbjar has cmpversion="2.0" set
     Bugzilla Reports 14707 and 14709.
   
  -* <pvcs> config attribute added to set the location of a specific PVCS .cfg file
  +* <pvcs> config attribute added to set the location of a specific PVCS
  +  .cfg file
     Bugzilla Report 9752
   
   * <mapper> has an "unpackage" mapper
  
  
  
  1.47      +7 -1      ant/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
  
  Index: FixCRLF.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- FixCRLF.java	19 Jun 2003 22:00:35 -0000	1.46
  +++ FixCRLF.java	24 Jun 2003 08:44:02 -0000	1.47
  @@ -580,6 +580,12 @@
                   }
               } else { // destFile does not exist - write the temp file
                   log("destFile does not exist", Project.MSG_DEBUG);
  +
  +                File parent = fileUtils.getParentFile(destFile);
  +                if (!parent.exists()) {
  +                    parent.mkdirs();
  +                }
  +
                   if (!tmpFile.renameTo(destFile)) {
                       throw new BuildException(
                               "Failed to transform " + srcFile
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message