ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r550549 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java
Date Mon, 25 Jun 2007 17:01:27 GMT
Author: peterreilly
Date: Mon Jun 25 10:01:22 2007
New Revision: 550549

URL: http://svn.apache.org/viewvc?view=rev&rev=550549
Log:
bugzilla 42735: filepath does not work anymore in <available>

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

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java?view=diff&rev=550549&r1=550548&r2=550549
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java Mon Jun 25 10:01:22
2007
@@ -323,12 +323,14 @@
         } else {
             String[] paths = filepath.list();
             for (int i = 0; i < paths.length; ++i) {
-                log("Searching " + paths[i], Project.MSG_DEBUG);
+                log("Searching " + paths[i], Project.MSG_VERBOSE);
                 File path = new File(paths[i]);
 
                 // **   full-pathname specified == path in list
                 // **   simple name specified   == path in list
-                if (path.exists() && filename.equals(paths[i])) {
+                if (path.exists() &&
+                    (filename.equals(paths[i])
+                     || filename.equals(path.getName()))) {
                     if (type == null) {
                         log("Found: " + path, Project.MSG_VERBOSE);
                         return true;
@@ -365,6 +367,7 @@
                         return true;
                     }
                 }
+
                 // **   simple name specified   == parent dir + name
                 while (searchParents && parent != null && parent.exists())
{
                     if (checkFile(new File(parent, filename),



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message