Browse Source

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 <bdeitte@macromedia.com>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273609 13f79535-47bb-0310-9956-ffa450edef68
master
Magesh Umasankar 22 years ago
parent
commit
db9a46b384
1 changed files with 11 additions and 7 deletions
  1. +11
    -7
      src/main/org/apache/tools/ant/taskdefs/Zip.java

+ 11
- 7
src/main/org/apache/tools/ant/taskdefs/Zip.java View File

@@ -371,14 +371,18 @@ public class Zip extends MatchingTask {

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);



Loading…
Cancel
Save