summaryrefslogtreecommitdiffstats
path: root/apps/files/lib
diff options
context:
space:
mode:
authorMichael Weimann <mail@michael-weimann.eu>2018-09-14 22:06:56 +0200
committerMichael Weimann <mail@michael-weimann.eu>2018-09-19 17:43:55 +0200
commit7e92b52974371bae4f69b74d26e3886f45102e39 (patch)
tree6a18bdabc5e407e4e9e5d92e975df0ebd1b3bcb4 /apps/files/lib
parent6112adfe064afbad17c485954d22e3947fe8ed13 (diff)
downloadnextcloud-server-7e92b52974371bae4f69b74d26e3886f45102e39.tar.gz
nextcloud-server-7e92b52974371bae4f69b74d26e3886f45102e39.zip
Fixes empty favorite names for trailing slashes
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
Diffstat (limited to 'apps/files/lib')
-rw-r--r--apps/files/lib/Controller/ViewController.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index 0655718f8c1..d91d3b9db4c 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -176,7 +176,6 @@ class ViewController extends Controller {
$currentCount = 0;
foreach ($favElements['folders'] as $dir) {
- $id = substr($dir, strrpos($dir, '/') + 1, strlen($dir));
$link = $this->urlGenerator->linkToRoute('files.view.index', ['dir' => $dir, 'view' => 'files']);
$sortingValue = ++$currentCount;
$element = [
@@ -186,7 +185,7 @@ class ViewController extends Controller {
'dir' => $dir,
'order' => $navBarPositionPosition,
'folderPosition' => $sortingValue,
- 'name' => $id,
+ 'name' => basename($dir),
'icon' => 'files',
'quickaccesselement' => 'true'
];