umagesh 2002/12/04 07:31:18
Modified: src/main/org/apache/tools/ant/taskdefs Zip.java
Log:
The zip task doesn't work correctly if you're using filesetmanifest and
update is false - Fix for this problem caused by previous patch.
Submitted by: Brian Deitte <[EMAIL PROTECTED]>
Revision Changes Path
1.85 +11 -7
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java
Index: Zip.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- Zip.java 21 Nov 2002 21:47:53 -0000 1.84
+++ Zip.java 4 Dec 2002 15:31:18 -0000 1.85
@@ -371,14 +371,18 @@
log(action + archiveType + ": " + zipFile.getAbsolutePath());
- ZipOutputStream zOut =
- new ZipOutputStream(new FileOutputStream(zipFile));
- zOut.setEncoding(encoding);
+ ZipOutputStream zOut = null;
try {
- if (doCompress) {
- zOut.setMethod(ZipOutputStream.DEFLATED);
- } else {
- zOut.setMethod(ZipOutputStream.STORED);
+
+ if (! skipWriting) {
+ zOut = new ZipOutputStream(new
FileOutputStream(zipFile));
+
+ zOut.setEncoding(encoding);
+ if (doCompress) {
+ zOut.setMethod(ZipOutputStream.DEFLATED);
+ } else {
+ zOut.setMethod(ZipOutputStream.STORED);
+ }
}
initZipOutputStream(zOut);
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>