Browse Source

do not add directories when filesonly is true.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@430489 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 19 years ago
parent
commit
43b12b92d9
2 changed files with 9 additions and 0 deletions
  1. +4
    -0
      WHATSNEW
  2. +5
    -0
      src/main/org/apache/tools/ant/taskdefs/Zip.java

+ 4
- 0
WHATSNEW View File

@@ -254,6 +254,10 @@ Fixed bugs:
* <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:
--------------



+ 5
- 0
src/main/org/apache/tools/ant/taskdefs/Zip.java View File

@@ -1345,6 +1345,11 @@ public class Zip extends MatchingTask {
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


Loading…
Cancel
Save