From 56d0c2f91a32a2067a6810bede57cbd0187c4190 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Mon, 27 Jan 2003 16:19:02 +0000 Subject: [PATCH] '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 --- src/main/org/apache/tools/ant/taskdefs/Tar.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/Tar.java b/src/main/org/apache/tools/ant/taskdefs/Tar.java index 0e7be20dd..580909f69 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Tar.java +++ b/src/main/org/apache/tools/ant/taskdefs/Tar.java @@ -1,7 +1,7 @@ /* * 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. * * 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(); String[] files = fs.getFiles(getProject()); - if (!archiveIsUpToDate(files)) { + if (!archiveIsUpToDate(files, fs.getDir(getProject()))) { upToDate = false; } @@ -429,7 +429,17 @@ public class Tar extends MatchingTask { } } + /** + * @deprecated use the two-arg version instead. + */ 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); MergingMapper mm = new MergingMapper(); mm.setTo(tarFile.getAbsolutePath());