From a18bd33107bf663133b056c68c52fb877dfc04a5 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Mon, 21 Feb 2005 08:40:16 +0000 Subject: [PATCH] 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 --- WHATSNEW | 4 ++-- src/main/org/apache/tools/ant/taskdefs/Zip.java | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/WHATSNEW b/WHATSNEW index 1bc965607..1581d5368 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -322,8 +322,8 @@ Fixed bugs: connetced to, potentially leading to exceptions in commons-net. Bugzilla Report 33618. -* 's defaultexcludes attribute was ignored when an archive was - updated. Bugzilla Report 33412. +* would drop files matched by defaultexcludes during updates. + Bugzilla Report 33412. * couldn't store files with size between 2GB and 4GB (the upper limit set by the ZIP format itself). Bugzilla Report 33310. diff --git a/src/main/org/apache/tools/ant/taskdefs/Zip.java b/src/main/org/apache/tools/ant/taskdefs/Zip.java index f96cfa8b6..48039f979 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Zip.java +++ b/src/main/org/apache/tools/ant/taskdefs/Zip.java @@ -524,8 +524,7 @@ public class Zip extends MatchingTask { ZipFileSet oldFiles = new ZipFileSet(); oldFiles.setProject(getProject()); oldFiles.setSrc(renamedFile); - oldFiles.setDefaultexcludes(getImplicitFileSet() - .getDefaultexcludes()); + oldFiles.setDefaultexcludes(false); for (int i = 0; i < addedFiles.size(); i++) { PatternSet.NameEntry ne = oldFiles.createExclude();