You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by mb...@apache.org on 2006/08/10 21:10:25 UTC
svn commit: r430489 - in /ant/core/trunk: WHATSNEW
src/main/org/apache/tools/ant/taskdefs/Zip.java
Author: mbenson
Date: Thu Aug 10 12:10:25 2006
New Revision: 430489
URL: http://svn.apache.org/viewvc?rev=430489&view=rev
Log:
do not add directories when filesonly is true.
Modified:
ant/core/trunk/WHATSNEW
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java
Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=430489&r1=430488&r2=430489&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Thu Aug 10 12:10:25 2006
@@ -254,6 +254,10 @@
* <xslt> passes the current file (name + directory) to the stylesheet/transformation.
xsl-parameter name is configurable. Bugzilla report 21042.
+* The <zip> API allowed creation of directories in file-only archives; a
+ habitual offender was the subclassed <jar>, which included META-INF/ in
+ the destination file regardless of whether filesonly was set to true.
+
Other changes:
--------------
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java?rev=430489&r1=430488&r2=430489&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java Thu Aug 10 12:10:25 2006
@@ -1345,6 +1345,11 @@
protected void zipDir(File dir, ZipOutputStream zOut, String vPath,
int mode, ZipExtraField[] extra)
throws IOException {
+ if (doFilesonly) {
+ log("skipping directory " + vPath + " for file-only archive",
+ Project.MSG_VERBOSE);
+ return;
+ }
if (addedDirs.get(vPath) != null) {
// don't add directories we've already added.
// no warning if we try, it is harmless in and of itself
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org