From 8b8cea1e308142afdc5e18146f768cb01a2a21d6 Mon Sep 17 00:00:00 2001 From: Antoine Levy-Lambert Date: Tue, 29 Jul 2003 19:47:16 +0000 Subject: [PATCH] the method isMorePowerfulThanExcludes was returning false on org/apache/tools/ant/taskdefs in the run-tests target of our buildfile because of the exclude pattern : :-( git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274984 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tools/ant/DirectoryScanner.java | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/main/org/apache/tools/ant/DirectoryScanner.java b/src/main/org/apache/tools/ant/DirectoryScanner.java index 9a3facc83..92d70e4b5 100644 --- a/src/main/org/apache/tools/ant/DirectoryScanner.java +++ b/src/main/org/apache/tools/ant/DirectoryScanner.java @@ -1004,19 +1004,10 @@ public class DirectoryScanner * @since ant1.6 */ private boolean isMorePowerfulThanExcludes(String name, String includepattern) { - String shortpattern = SelectorUtils.rtrimWildcardTokens(includepattern); + String soughtexclude = name + File.separator + "**"; for (int counter=0; counter means exclude only the directory foo, but not its subdirs - if (shortexclude.length() < excludes[counter].length()) { - if (excludes[counter].charAt(shortexclude.length()) == File.separatorChar) { - if (matchPath(shortexclude, name, isCaseSensitive)) { - if (shortexclude.length() > shortpattern.length()) { - return false; - } - } - } + if (excludes[counter].equals(soughtexclude)) { + return false; } } return true;