summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/public.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 13a328ff74c..67b2dca8c9e 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -122,12 +122,16 @@ if (isset($_GET['file']) || isset($_GET['dir'])) {
// Make breadcrumb
$breadcrumb = array();
$pathtohere = '';
+ $count = 1;
foreach (explode('/', $dir) as $i) {
if ($i != '') {
if ($i != $baseDir) {
$pathtohere .= '/'.$i;
+ }
+ if ( strlen($pathtohere) < strlen($_GET['dir'])) {
+ continue;
}
- $breadcrumb[] = array('dir' => $pathtohere, 'name' => $i);
+ $breadcrumb[] = array('dir' => str_replace($_GET['dir'], "", $pathtohere, $count), 'name' => $i);
}
}
$list = new OCP\Template('files', 'part.list', '');