bodewig 2003/07/23 00:25:59
Modified: src/main/org/apache/tools/ant DirectoryScanner.java
Log:
fix new DirectoryScanner tests, still needs to be improved to avoid
double-scanning
Revision Changes Path
1.52 +9 -2 ant/src/main/org/apache/tools/ant/DirectoryScanner.java
Index: DirectoryScanner.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/DirectoryScanner.java,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- DirectoryScanner.java 23 Jul 2003 06:59:47 -0000 1.51
+++ DirectoryScanner.java 23 Jul 2003 07:25:59 -0000 1.52
@@ -910,6 +910,10 @@
* @param file included file
*/
private void accountForIncludedFile(String name, File file) {
+ if (!filesIncluded.contains(name)
+ && !filesExcluded.contains(name)
+ && !filesDeselected.contains(name)) {
+
if (!isExcluded(name)) {
if (isSelected(name, file)) {
filesIncluded.addElement(name);
@@ -921,7 +925,7 @@
everythingIncluded = false;
filesExcluded.addElement(name);
}
-
+ }
}
/**
@@ -932,6 +936,9 @@
* @param fast
*/
private void accountForIncludedDir(String name, File file, boolean fast)
{
+ if (!dirsIncluded.contains(name)
+ && !dirsExcluded.contains(name)
+ && !dirsDeselected.contains(name)) {
if (!isExcluded(name)) {
if (isSelected(name, file)) {
dirsIncluded.addElement(name);
@@ -953,7 +960,7 @@
scandir(file, name + File.separator, fast);
}
}
-
+ }
}
/**
* Tests whether or not a name matches against at least one include
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]