missing closedir, can lead to Too many open files bugs

This commit is contained in:
Régis Leroy 2008-07-02 07:57:13 +00:00
parent 4bca7982d6
commit b68e7f0041

View File

@ -567,6 +567,7 @@
$list[] = substr($file,0,strpos($file,'.'));
}
}
closedir($dh);
}
if(!is_array($list))
{
@ -578,8 +579,8 @@
$list[] = substr($file,0,strpos($file,'.'));
}
}
closedir($dh);
}
closedir($dh);
reset ($list);
return $list;
}
@ -691,9 +692,11 @@
$ext = strtolower(strrchr($f,'.'));
if (($ext == '.gif' || $ext == '.png') && strpos($f,'navbar') === False)
{
closedir($d);
return True;
}
}
closedir($d);
}
return False;
}