fixed subdirectory calculation

This commit is contained in:
tmont 2009-06-30 05:43:46 +00:00
parent cbe3495dd5
commit dafa6ebffa

View File

@ -302,8 +302,9 @@
$info = ''; $info = '';
$link = ''; $link = '';
$subdirs = array(); $subdirs = array();
$cleanDir = rtrim($dir, DIRECTORY_SEPARATOR);
foreach ($dirData as $dir2 => $data2) { foreach ($dirData as $dir2 => $data2) {
if ($dir === DIRECTORY_SEPARATOR || substr($dir2, 0, strrpos($dir2, DIRECTORY_SEPARATOR)) === $dir) { if (substr($dir2, 0, strrpos($dir2, DIRECTORY_SEPARATOR)) === $cleanDir) {
//this is a direct subdirectory //this is a direct subdirectory
$subdirs[] = $dir2; $subdirs[] = $dir2;
} }