svn commit: rev 22328 - avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks

[email protected]
Newsgroups gmane.comp.jakarta.avalon.cvs
Message-ID <[email protected]>
Author: mcconnell
Date: Wed Jun 30 07:03:11 2004
New Revision: 22328

Modified:
   avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/ReactorTask.java
Log:
Fixed a bug in the reactor that would result in the conclusion that the file path xxx/yyy was within the parent xxx/yy.

Modified: avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/ReactorTask.java
==============================================================================
--- avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/ReactorTask.java	(original)
+++ avalon/trunk/tools/magic/src/main/org/apache/avalon/tools/tasks/ReactorTask.java	Wed Jun 30 07:03:11 2004
@@ -242,7 +242,18 @@
                 final String base = def.getBaseDir().getCanonicalPath();
                 if( base.startsWith( path ) )
                 {
-                    list.add( def );
+                    if( base.length() == path.length() )
+                    {
+                        list.add( def );
+                    }
+                    else
+                    {
+                        String next = base.substring( path.length() );
+                        if( next.startsWith( File.separator ) )
+                        {
+                            list.add( def );
+                        }
+                    }
                 }
             }
             return list;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.