]> source.dussan.org Git - nextcloud-server.git/commitdiff
trim leading slash
authorRobin Appelman <icewind@owncloud.com>
Wed, 6 Aug 2014 12:57:54 +0000 (14:57 +0200)
committerRobin Appelman <icewind@owncloud.com>
Wed, 6 Aug 2014 12:57:54 +0000 (14:57 +0200)
apps/files_sharing/lib/cache.php

index adea07e5f7ba014826e2180f8e09ed50cf29870a..e4fd85fd2a7251ab42482ba9350502ea00c16b96 100644 (file)
@@ -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);