diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-11-28 20:06:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 20:06:23 +0100 |
commit | 3da7364c364445997727133d04b4a053b90321f8 (patch) | |
tree | 1c221242d56e9fbd982e826d897d5b368b9b99f0 /lib | |
parent | 3ea7fa19d5edbaac5cce13180dd8f695caa72c4b (diff) | |
parent | 9d9f6903c9e2a94f2a1b230fd35ec586b18b7a77 (diff) | |
download | nextcloud-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.php | 2 |
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)) |