Index: includes/file.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.130
diff -u -p -r1.130 file.inc
--- includes/file.inc	6 Sep 2008 08:36:19 -0000	1.130
+++ includes/file.inc	11 Sep 2008 19:30:15 -0000
@@ -925,7 +925,7 @@ function file_scan_directory($dir, $mask
           // Give priority to files in this folder by merging them in after any subdirectory files.
           $files = array_merge(file_scan_directory("$dir/$file", $mask, $nomask, $callback, $recurse, $key, $min_depth, $depth + 1), $files);
         }
-        elseif ($depth >= $min_depth && ereg($mask, $file)) {
+        elseif ($depth >= $min_depth && eregi($mask, $file)) {
           // Always use this match over anything already set in $files with the same $$key.
           $filename = "$dir/$file";
           $basename = basename($file);
