Browse Source

tweak a backwards incompatibilty in <tar>

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@326976 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 20 years ago
parent
commit
27f9f065c8
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      src/main/org/apache/tools/ant/taskdefs/Tar.java

+ 12
- 0
src/main/org/apache/tools/ant/taskdefs/Tar.java View File

@@ -323,6 +323,18 @@ public class Tar extends MatchingTask {
protected void tarFile(File file, TarOutputStream tOut, String vPath,
TarFileSet tarFileSet)
throws IOException {
if (file.equals(tarFile)) {
// If the archive is built for the first time and it is
// matched by a resource collection, then it hasn't been
// found in check (it hasn't been there) but will be
// included now.
//
// for some strange reason the old code would simply skip
// the entry and not fail, do the same now for backwards
// compatibility reasons. Without this, the which4j build
// fails in Gump
return;
}
tarResource(new FileResource(file), tOut, vPath, tarFileSet);
}



Loading…
Cancel
Save