]> git.mjollnir.org Git - moodle.git/commitdiff
Unit tests: in recurseFolders, skip files/folders whose names begnis with '.'/
authortjhunt <tjhunt>
Tue, 10 Mar 2009 07:53:42 +0000 (07:53 +0000)
committertjhunt <tjhunt>
Tue, 10 Mar 2009 07:53:42 +0000 (07:53 +0000)
lib/simpletestlib.php

index 553265585734e4d22f63977538d893aa91accd87..196fa5f24772e388fa4a68480b266e3f9857726a 100644 (file)
@@ -37,7 +37,8 @@ function recurseFolders($path, $callback, $fileregexp = '/.*/', $exclude = false
 
     foreach ($files as $file) {
         $filepath = $path .'/'. $file;
-        if ($file == '.' || $file == '..') {
+        if (strpos($file, '.') === 0) {
+            /// Don't check hidden files.
             continue;
         } else if (is_dir($filepath)) {
             if (!in_array($filepath, $ignorefolders)) {