diff options
Diffstat (limited to 'lib/private/Files/Node/Folder.php')
-rw-r--r-- | lib/private/Files/Node/Folder.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index 9809c6b7d11..fcadbe27393 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -280,7 +280,12 @@ class Folder extends Node implements \OCP\Files\Folder { */ public function getById($id) { $mountCache = $this->root->getUserMountCache(); - $mountsContainingFile = $mountCache->getMountsForFileId((int)$id); + if (strpos($this->getPath(), '/', 1) > 0) { + list(, $user) = explode('/', $this->getPath()); + } else { + $user = null; + } + $mountsContainingFile = $mountCache->getMountsForFileId((int)$id, $user); $mounts = $this->root->getMountsIn($this->path); $mounts[] = $this->root->getMount($this->path); /** @var IMountPoint[] $folderMounts */ |