Browse Source

<tar>'s up-to-date check didn't work for nested filesets.

PR: 14995


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

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

@@ -1,7 +1,7 @@
/* /*
* The Apache Software License, Version 1.1 * The Apache Software License, Version 1.1
* *
* Copyright (c) 2000-2002 The Apache Software Foundation. All rights
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights
* reserved. * reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -266,7 +266,7 @@ public class Tar extends MatchingTask {
TarFileSet fs = (TarFileSet) e.nextElement(); TarFileSet fs = (TarFileSet) e.nextElement();
String[] files = fs.getFiles(getProject()); String[] files = fs.getFiles(getProject());


if (!archiveIsUpToDate(files)) {
if (!archiveIsUpToDate(files, fs.getDir(getProject()))) {
upToDate = false; upToDate = false;
} }


@@ -429,7 +429,17 @@ public class Tar extends MatchingTask {
} }
} }


/**
* @deprecated use the two-arg version instead.
*/
protected boolean archiveIsUpToDate(String[] files) { protected boolean archiveIsUpToDate(String[] files) {
return archiveIsUpToDate(files, baseDir);
}

/**
* @since Ant 1.5.2
*/
protected boolean archiveIsUpToDate(String[] files, File dir) {
SourceFileScanner sfs = new SourceFileScanner(this); SourceFileScanner sfs = new SourceFileScanner(this);
MergingMapper mm = new MergingMapper(); MergingMapper mm = new MergingMapper();
mm.setTo(tarFile.getAbsolutePath()); mm.setTo(tarFile.getAbsolutePath());


Loading…
Cancel
Save