- Patch #230932 by ryanlath: file_scan_directory() didn't scan the directory called '0'.

merge-requests/26/head
Dries Buytaert 2008-04-23 18:17:41 +00:00
parent d4a5a2be65
commit 3cbfa1dac6
1 changed files with 1 additions and 1 deletions

View File

@ -884,7 +884,7 @@ function file_scan_directory($dir, $mask, $nomask = array('.', '..', 'CVS'), $ca
$files = array();
if (is_dir($dir) && $handle = opendir($dir)) {
while ($file = readdir($handle)) {
while (false !== ($file = readdir($handle))) {
if (!in_array($file, $nomask) && $file[0] != '.') {
if (is_dir("$dir/$file") && $recurse) {
// Give priority to files in this folder by merging them in after any subdirectory files.