diff --git a/WHATSNEW b/WHATSNEW index 7fd8d0657..334839934 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -109,8 +109,8 @@ Fixed bugs: * The 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 and - were hanging. Bugzilla Reports 18129 and 18956. +* Perforce tasks relying on output from the server such as + and were hanging. Bugzilla Reports 18129 and 18956. * build.sh install had a problem on cygwin (with REALANTHOME). Bugzilla Report 17257 @@ -121,7 +121,8 @@ Fixed bugs: * file names that include spaces need to be quoted inside the @argfile argument using forked 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 @@ Fixed bugs: * 's and 's nested patternsets didn't work as documented when the pattern ended in a slash or backslash. Bugzilla Report 20969. +* 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 @@ Bugzilla Report 19180. if ejbjar has cmpversion="2.0" set Bugzilla Reports 14707 and 14709. -* config attribute added to set the location of a specific PVCS .cfg file +* config attribute added to set the location of a specific PVCS + .cfg file Bugzilla Report 9752 * has an "unpackage" mapper diff --git a/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java b/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java index f33399368..6bbc74861 100644 --- a/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java +++ b/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java @@ -580,6 +580,12 @@ public class FixCRLF extends MatchingTask { } } 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