diff --git a/index.php b/index.php index 18fd85a..0e2e7f7 100644 --- a/index.php +++ b/index.php @@ -117,9 +117,10 @@ if (!empty($curfiles)| !empty($dirs)) { $data['images'][] = $tmp; } } - if (!empty($d)) { + if (!empty($dir)) { + $tmpdirs = array_filter(explode(DIRECTORY_SEPARATOR, $dir)); $tmppath = ''; - foreach($d as $tmpdir) { + foreach($tmpdirs as $tmpdir) { $tmppath=$tmppath.DIRECTORY_SEPARATOR.$tmpdir; $data['crumbs'][$tmpdir] = $tmppath; }