summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Node
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/Node')
-rw-r--r--lib/private/Files/Node/Folder.php9
-rw-r--r--lib/private/Files/Node/LazyRoot.php2
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php
index 45372d0fedf..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 */
@@ -413,7 +418,7 @@ class Folder extends Node implements \OCP\Files\Folder {
$storage = $mount->getStorage();
if ($storage->instanceOfStorage('\OC\Files\Storage\Wrapper\Jail')) {
/** @var \OC\Files\Storage\Wrapper\Jail $storage */
- $jailRoot = $storage->getSourcePath('');
+ $jailRoot = $storage->getUnjailedPath('');
$rootLength = strlen($jailRoot) + 1;
if ($path === $jailRoot) {
return $mount->getMountPoint();
diff --git a/lib/private/Files/Node/LazyRoot.php b/lib/private/Files/Node/LazyRoot.php
index 1fb3f6448bc..ae7623d0ed9 100644
--- a/lib/private/Files/Node/LazyRoot.php
+++ b/lib/private/Files/Node/LazyRoot.php
@@ -21,9 +21,7 @@
*/
namespace OC\Files\Node;
-use OC\Files\Mount\MountPoint;
use OCP\Files\IRootFolder;
-use OCP\Files\NotPermittedException;
/**
* Class LazyRoot