From: Robin Appelman Date: Wed, 6 Aug 2014 12:57:54 +0000 (+0200) Subject: trim leading slash X-Git-Tag: v8.0.0alpha1~954^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eb8683e6eeb0baa81395118f261cbfe6f002f411;p=nextcloud-server.git trim leading slash --- diff --git a/apps/files_sharing/lib/cache.php b/apps/files_sharing/lib/cache.php index adea07e5f7b..e4fd85fd2a7 100644 --- a/apps/files_sharing/lib/cache.php +++ b/apps/files_sharing/lib/cache.php @@ -405,7 +405,7 @@ class Shared_Cache extends Cache { public function getPathById($id, $pathEnd = '') { // direct shares are easy if ($id === $this->storage->getSourceId()) { - return $pathEnd; + return ltrim($pathEnd, '/'); } else { // if the item is a direct share we try and get the path of the parent and append the name of the item to it list($parent, $name) = $this->getParentInfo($id);