ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1036906 - /ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java
Date Fri, 19 Nov 2010 15:47:48 GMT
Author: bodewig
Date: Fri Nov 19 15:47:48 2010
New Revision: 1036906

URL: http://svn.apache.org/viewvc?rev=1036906&view=rev
Log:
restrict impact of fix for PR 50295 on 'good' VMs to an additional syscall for empty directories
rather than an additional call for every directory

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java?rev=1036906&r1=1036905&r2=1036906&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java Fri Nov 19 15:47:48
2010
@@ -1248,7 +1248,7 @@ public class DirectoryScanner
             TokenizedPath newPath = new TokenizedPath(path, newfiles[i]);
             File file = new File(dir, newfiles[i]);
             String[] children = file.list();
-            if (children == null || file.isFile()) {
+            if (children == null || (children.length == 0 && file.isFile())) {
                 if (isIncluded(newPath)) {
                     accountForIncludedFile(newPath, file);
                 } else {



Mime
View raw message