Browse Source

On second thought, this seems to be the real fix for

PR: 33412

when updating an archive, we never want to drop files from the
original archive, no matter what the current default excludes setting
says.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277701 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 20 years ago
parent
commit
a18bd33107
2 changed files with 3 additions and 4 deletions
  1. +2
    -2
      WHATSNEW
  2. +1
    -2
      src/main/org/apache/tools/ant/taskdefs/Zip.java

+ 2
- 2
WHATSNEW View File

@@ -322,8 +322,8 @@ Fixed bugs:
connetced to, potentially leading to exceptions in commons-net. connetced to, potentially leading to exceptions in commons-net.
Bugzilla Report 33618. Bugzilla Report 33618.


* <zip>'s defaultexcludes attribute was ignored when an archive was
updated. Bugzilla Report 33412.
* <zip> would drop files matched by defaultexcludes during updates.
Bugzilla Report 33412.


* <zip> couldn't store files with size between 2GB and 4GB (the * <zip> couldn't store files with size between 2GB and 4GB (the
upper limit set by the ZIP format itself). Bugzilla Report 33310. upper limit set by the ZIP format itself). Bugzilla Report 33310.


+ 1
- 2
src/main/org/apache/tools/ant/taskdefs/Zip.java View File

@@ -524,8 +524,7 @@ public class Zip extends MatchingTask {
ZipFileSet oldFiles = new ZipFileSet(); ZipFileSet oldFiles = new ZipFileSet();
oldFiles.setProject(getProject()); oldFiles.setProject(getProject());
oldFiles.setSrc(renamedFile); oldFiles.setSrc(renamedFile);
oldFiles.setDefaultexcludes(getImplicitFileSet()
.getDefaultexcludes());
oldFiles.setDefaultexcludes(false);


for (int i = 0; i < addedFiles.size(); i++) { for (int i = 0; i < addedFiles.size(); i++) {
PatternSet.NameEntry ne = oldFiles.createExclude(); PatternSet.NameEntry ne = oldFiles.createExclude();


Loading…
Cancel
Save