Browse Source

<cab> should now deal with file names containing spaces.

PR: 17182
Submitted by:	Jay Peck <jpeck at afsimage dot com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277930 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 20 years ago
parent
commit
55969a2dae
3 changed files with 10 additions and 2 deletions
  1. +1
    -0
      CONTRIBUTORS
  2. +3
    -0
      WHATSNEW
  3. +6
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/Cab.java

+ 1
- 0
CONTRIBUTORS View File

@@ -89,6 +89,7 @@ Jason Pettiss
Jason Salter Jason Salter
Jason Yip Jason Yip
Jay Dickon Glanville Jay Dickon Glanville
Jay Peck
Jay van der Meer Jay van der Meer
JC Mann JC Mann
J D Glanville J D Glanville


+ 3
- 0
WHATSNEW View File

@@ -385,6 +385,9 @@ Fixed bugs:
* The framed JUnit report now handles multiple reports for the same * The framed JUnit report now handles multiple reports for the same
testcase properly. Bugzilla Report 32745. testcase properly. Bugzilla Report 32745.


* <cab> 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 Changes from Ant 1.6.1 to Ant 1.6.2
=================================== ===================================




+ 6
- 2
src/main/org/apache/tools/ant/taskdefs/optional/Cab.java View File

@@ -145,6 +145,9 @@ public class Cab extends MatchingTask {
/** /**
* Creates a list file. This temporary file contains a list of all files * Creates a list file. This temporary file contains a list of all files
* to be included in the cab, one file per line. * to be included in the cab, one file per line.
*
* <p>This method expects to only be called on Windows and thus
* quotes the file names.</p>
*/ */
protected File createListFile(Vector files) protected File createListFile(Vector files)
throws IOException { throws IOException {
@@ -153,8 +156,9 @@ public class Cab extends MatchingTask {


PrintWriter writer = new PrintWriter(new FileOutputStream(listFile)); 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(); writer.close();




Loading…
Cancel
Save