From 32fb73f1b90e7f457c4d4cbb3eb77940c344508b Mon Sep 17 00:00:00 2001 From: Marco Antonio Garrido Rojo <3d17marcoantonio.garrido@gmail.com> Date: Wed, 29 Mar 2017 16:14:33 +0200 Subject: [PATCH] Modify listBreadcrumbs --- resources/DirectoryLister.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/resources/DirectoryLister.php b/resources/DirectoryLister.php index c038008..b863b27 100644 --- a/resources/DirectoryLister.php +++ b/resources/DirectoryLister.php @@ -198,21 +198,15 @@ class DirectoryLister { ); // Generate breadcrumbs + $dirPath = null; + foreach ($dirArray as $key => $dir) { if ($dir != '.') { - $dirPath = null; - // Build the directory path - for ($i = 0; $i <= $key; $i++) { - $dirPath = $dirPath . $dirArray[$i] . '/'; - } - - // Remove trailing slash - if(substr($dirPath, -1) == '/') { - $dirPath = substr($dirPath, 0, -1); - } + if ($dirPath === null) $dirPath = $dir; + else $dirPath = $dirPath . '/' . $dir; // Combine the base path and dir path $link = $this->_appURL . '?dir=' . rawurlencode($dirPath);