summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-11-28 20:06:23 +0100
committerGitHub <noreply@github.com>2018-11-28 20:06:23 +0100
commit3da7364c364445997727133d04b4a053b90321f8 (patch)
tree1c221242d56e9fbd982e826d897d5b368b9b99f0 /lib
parent3ea7fa19d5edbaac5cce13180dd8f695caa72c4b (diff)
parent9d9f6903c9e2a94f2a1b230fd35ec586b18b7a77 (diff)
downloadnextcloud-server-3da7364c364445997727133d04b4a053b90321f8.tar.gz
nextcloud-server-3da7364c364445997727133d04b4a053b90321f8.zip
Merge pull request #12708 from nextcloud/getbyid-mount-root
Fix folder path containing leading slash when getting mount root by id
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Node/Folder.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php
index 0eb119eb0de..e35ca85a779 100644
--- a/lib/private/Files/Node/Folder.php
+++ b/lib/private/Files/Node/Folder.php
@@ -313,7 +313,7 @@ class Folder extends Node implements \OCP\Files\Folder {
$internalPath = ltrim($cachedMountInfo->getRootInternalPath() . '/' . $cacheEntry->getPath(), '/');
$pathRelativeToMount = substr($internalPath, strlen($cachedMountInfo->getRootInternalPath()));
$pathRelativeToMount = ltrim($pathRelativeToMount, '/');
- $absolutePath = $cachedMountInfo->getMountPoint() . $pathRelativeToMount;
+ $absolutePath = rtrim($cachedMountInfo->getMountPoint() . $pathRelativeToMount, '/');
return $this->root->createNode($absolutePath, new \OC\Files\FileInfo(
$absolutePath, $mount->getStorage(), $cacheEntry->getPath(), $cacheEntry, $mount,
\OC::$server->getUserManager()->get($mount->getStorage()->getOwner($pathRelativeToMount))