From b162d01b936b045654a3ef9410e30b42b770280b Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Tue, 27 Mar 2001 08:17:14 +0000 Subject: [PATCH] Omit the basedir itself (which would be added as /) from zipfile. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268890 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/Zip.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/org/apache/tools/ant/taskdefs/Zip.java b/src/main/org/apache/tools/ant/taskdefs/Zip.java index df0e34dad..2acbf56d6 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Zip.java +++ b/src/main/org/apache/tools/ant/taskdefs/Zip.java @@ -236,6 +236,9 @@ public class Zip extends MatchingTask { if (dirs.length > 0 && fullpath.length() > 0) throw new BuildException("fullpath attribute may only be specified for filesets that specify a single file."); for (int i = 0; i < dirs.length; i++) { + if ("".equals(dirs[i])) { + continue; + } String name = dirs[i].replace(File.separatorChar,'/'); if (!name.endsWith("/")) { name += "/";