diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 7892e8675..9fb7a73a9 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -89,6 +89,7 @@ Jason Pettiss Jason Salter Jason Yip Jay Dickon Glanville +Jay Peck Jay van der Meer JC Mann J D Glanville diff --git a/WHATSNEW b/WHATSNEW index 4e36ed613..b1a5c2226 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -385,6 +385,9 @@ Fixed bugs: * The framed JUnit report now handles multiple reports for the same testcase properly. Bugzilla Report 32745. +* didn't work for files with spaces in their names on Windows. + Bugzilla Report 17182. + Changes from Ant 1.6.1 to Ant 1.6.2 =================================== diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java b/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java index 534acb982..3519e8bc0 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java @@ -145,6 +145,9 @@ public class Cab extends MatchingTask { /** * Creates a list file. This temporary file contains a list of all files * to be included in the cab, one file per line. + * + *

This method expects to only be called on Windows and thus + * quotes the file names.

*/ protected File createListFile(Vector files) throws IOException { @@ -153,8 +156,9 @@ public class Cab extends MatchingTask { PrintWriter writer = new PrintWriter(new FileOutputStream(listFile)); - for (int i = 0; i < files.size(); i++) { - writer.println(files.elementAt(i).toString()); + int size = files.size(); + for (int i = 0; i < size; i++) { + writer.println('\"' + files.elementAt(i).toString() + '\"'); } writer.close();