Browse Source

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
master
Stefan Bodewig 24 years ago
parent
commit
b162d01b93
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/main/org/apache/tools/ant/taskdefs/Zip.java

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

@@ -236,6 +236,9 @@ public class Zip extends MatchingTask {
if (dirs.length > 0 && fullpath.length() > 0) if (dirs.length > 0 && fullpath.length() > 0)
throw new BuildException("fullpath attribute may only be specified for filesets that specify a single file."); throw new BuildException("fullpath attribute may only be specified for filesets that specify a single file.");
for (int i = 0; i < dirs.length; i++) { for (int i = 0; i < dirs.length; i++) {
if ("".equals(dirs[i])) {
continue;
}
String name = dirs[i].replace(File.separatorChar,'/'); String name = dirs[i].replace(File.separatorChar,'/');
if (!name.endsWith("/")) { if (!name.endsWith("/")) {
name += "/"; name += "/";


Loading…
Cancel
Save