diff --git a/WHATSNEW b/WHATSNEW index ef140703c..a86cdab84 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -55,6 +55,9 @@ Other changes: * merged the BZIP2 package from Commons Compress, it can now optionally read files that contain multiple streams properly. + * will now properly expand files created by pbzip2 and + similar tools that create files with multiple bzip2 streams. + Changes from Ant 1.8.3 TO Ant 1.8.4 =================================== diff --git a/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java b/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java index 2f13626b9..0129fea2f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java +++ b/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java @@ -75,7 +75,7 @@ public class BUnzip2 extends Unpack { if (b != 'Z') { throw new BuildException("Invalid bz2 file.", getLocation()); } - zIn = new CBZip2InputStream(bis); + zIn = new CBZip2InputStream(bis, true); byte[] buffer = new byte[BUFFER_SIZE]; int count = 0; do { diff --git a/src/tests/antunit/taskdefs/bunzip2-test.xml b/src/tests/antunit/taskdefs/bunzip2-test.xml new file mode 100644 index 000000000..a9ca42376 --- /dev/null +++ b/src/tests/antunit/taskdefs/bunzip2-test.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/tests/antunit/taskdefs/bzip2/expected b/src/tests/antunit/taskdefs/bzip2/expected new file mode 100644 index 000000000..9ae9e86b7 --- /dev/null +++ b/src/tests/antunit/taskdefs/bzip2/expected @@ -0,0 +1 @@ +ab \ No newline at end of file diff --git a/src/tests/antunit/taskdefs/bzip2/multiple.bz2 b/src/tests/antunit/taskdefs/bzip2/multiple.bz2 new file mode 100644 index 000000000..26dc3a750 Binary files /dev/null and b/src/tests/antunit/taskdefs/bzip2/multiple.bz2 differ