bodewig     2004/04/16 02:36:00

  Modified:    .        Tag: ANT_16_BRANCH WHATSNEW
               src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
                        Zip.java
  Log:
  merge
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.503.2.71 +4 -1      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.503.2.70
  retrieving revision 1.503.2.71
  diff -u -r1.503.2.70 -r1.503.2.71
  --- WHATSNEW  16 Apr 2004 08:36:46 -0000      1.503.2.70
  +++ WHATSNEW  16 Apr 2004 09:35:59 -0000      1.503.2.71
  @@ -44,7 +44,10 @@
     with gcj which has been impossible in Ant < 1.6.2.
   
   * <xslt> now sets the context classloader if you've specified a nested
  -  <classpath>.  Bugzilla report 24802.
  +  <classpath>.  Bugzilla Report 24802.
  +
  +* <zip> and friends would delete the original file when trying to update
  +  a read-only archive.  Bugzilla Report 28419.
   
   Other changes:
   --------------
  
  
  
  No                   revision
  No                   revision
  1.116.2.7 +8 -0      ant/src/main/org/apache/tools/ant/taskdefs/Zip.java
  
  Index: Zip.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
  retrieving revision 1.116.2.6
  retrieving revision 1.116.2.7
  diff -u -r1.116.2.6 -r1.116.2.7
  --- Zip.java  9 Mar 2004 17:01:34 -0000       1.116.2.6
  +++ Zip.java  16 Apr 2004 09:35:59 -0000      1.116.2.7
  @@ -312,6 +312,14 @@
                                        + archiveType + " file to create!");
           }
   
  +        if (zipFile.exists() && !zipFile.isFile()) {
  +            throw new BuildException(zipFile + " is not a file.");
  +        }
  +
  +        if (zipFile.exists() && !zipFile.canWrite()) {
  +            throw new BuildException(zipFile + " is read-only.");
  +        }
  +
           // Renamed version of original file, if it exists
           File renamedFile = null;
           // Whether or not an actual update is required -
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to