aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/cache/permissions.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/private/files/cache/permissions.php b/lib/private/files/cache/permissions.php
index eba18af3863..a2a614ca0b1 100644
--- a/lib/private/files/cache/permissions.php
+++ b/lib/private/files/cache/permissions.php
@@ -15,14 +15,28 @@ class Permissions {
private $storageId;
/**
+ * @var \OC\Files\Storage\Storage $storage
+ */
+ protected $storage;
+
+ /**
* @param \OC\Files\Storage\Storage|string $storage
*/
public function __construct($storage) {
if ($storage instanceof \OC\Files\Storage\Storage) {
$this->storageId = $storage->getId();
+ $this->storage = $storage;
} else {
$this->storageId = $storage;
+ $mountManager = \OC\Files\Filesystem::getMountManager();
+ $mount = $mountManager->findByStorageId($this->storageId);
+ $firstMountPoint = reset($mount);
+ if ($firstMountPoint instanceof \OC\Files\Storage\Storage) {
+ $storage = $firstMountPoint->getStorage();
+ $this->storage = $storage;
+ }
}
+
}
/**