You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ro...@apache.org on 2006/02/21 11:01:13 UTC

svn commit: r379407 - /incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/File.cpp

Author: robbinspg
Date: Tue Feb 21 02:01:10 2006
New Revision: 379407

URL: http://svn.apache.org/viewcvs?rev=379407&view=rev
Log:
Fix file pattern matching bug.

Modified:
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/File.cpp

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/File.cpp
URL: http://svn.apache.org/viewcvs/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/File.cpp?rev=379407&r1=379406&r2=379407&view=diff
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/File.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/File.cpp Tue Feb 21 02:01:10 2006
@@ -194,8 +194,10 @@
                         string filename = entry->d_name;
                 
                         if ((exactMatch && filename == pattern) ||
-                            (!exactMatch && ((filename.find(token1) == 0)
-                             && (filename.rfind(token2) == filename.length() - token2.length()))))
+                            (!exactMatch &&
+                             ((filename.find(token1) == 0)
+                             && (filename.length() >= token2.length())
+                             && (filename.rfind(token2) == (filename.length() - token2.length())) )))
                         {
                             // Add the file to our list
                             files.push_back(File(rootDir, filename));