You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2010/11/19 16:44:38 UTC

svn commit: r1036905 - /ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java

Author: bodewig
Date: Fri Nov 19 15:44:38 2010
New Revision: 1036905

URL: http://svn.apache.org/viewvc?rev=1036905&view=rev
Log:
Make DirectoryScanner work on buggy JVMs where File.list() returns an empty array rather than null for files.  PR 50295.  Submitted by Daniel Smith

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=1036905&r1=1036904&r2=1036905&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:44:38 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) { // probably file
+            if (children == null || file.isFile()) {
                 if (isIncluded(newPath)) {
                     accountForIncludedFile(newPath, file);
                 } else {