ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From umag...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Zip.java
Date Wed, 04 Dec 2002 15:31:18 GMT
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 <bdeitte@macromedia.com>
  
  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:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message