Browse Source

don't scan directories that are excluded recursively - this used to be done everywhere except for the (most common) case where the directory itself was not explicitly included. PR 49420

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@953281 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 15 years ago
parent
commit
6a87b53fcb
2 changed files with 8 additions and 1 deletions
  1. +6
    -0
      WHATSNEW
  2. +2
    -1
      src/main/org/apache/tools/ant/DirectoryScanner.java

+ 6
- 0
WHATSNEW View File

@@ -45,6 +45,12 @@ Fixed bugs:
a temporary file. a temporary file.
Bugzilla Report 49419. Bugzilla Report 49419.


* Ant would often scan directories even though there were known to
only hold excluded files when evaluating filesets. This never
resulted in worng results but degraded performance of the scan
itself.
Bugzilla Report 49420.

Other changes: Other changes:
-------------- --------------




+ 2
- 1
src/main/org/apache/tools/ant/DirectoryScanner.java View File

@@ -1255,7 +1255,8 @@ public class DirectoryScanner
} else { } else {
everythingIncluded = false; everythingIncluded = false;
dirsNotIncluded.addElement(name); dirsNotIncluded.addElement(name);
if (fast && couldHoldIncluded(newPath)) {
if (fast && couldHoldIncluded(newPath)
&& !contentsExcluded(newPath)) {
scandir(file, newPath, fast, children, scandir(file, newPath, fast, children,
directoryNamesFollowed); directoryNamesFollowed);
} }


Loading…
Cancel
Save