summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/encryption/manager.php25
1 files changed, 14 insertions, 11 deletions
diff --git a/lib/private/encryption/manager.php b/lib/private/encryption/manager.php
index f8ac174479e..484e0f540b2 100644
--- a/lib/private/encryption/manager.php
+++ b/lib/private/encryption/manager.php
@@ -185,16 +185,19 @@ class Manager implements \OCP\Encryption\IManager {
'storage' => $storage,
'mountPoint' => $mountPoint,
'mount' => $mount];
- $manager = \OC::$server->getEncryptionManager();
- $util = new \OC\Encryption\Util(
- new \OC\Files\View(),
- \OC::$server->getUserManager(),
- \OC::$server->getConfig());
- $user = \OC::$server->getUserSession()->getUser();
- $logger = \OC::$server->getLogger();
- $uid = $user ? $user->getUID() : null;
- $fileHelper = \OC::$server->getEncryptionFilesHelper();
- return new Encryption($parameters, $manager, $util, $logger, $fileHelper, $uid);
- });
+
+ if (!($storage instanceof \OC\Files\Storage\Shared)) {
+ $manager = \OC::$server->getEncryptionManager();
+ $util = new \OC\Encryption\Util(
+ new \OC\Files\View(), \OC::$server->getUserManager(), \OC::$server->getConfig());
+ $user = \OC::$server->getUserSession()->getUser();
+ $logger = \OC::$server->getLogger();
+ $uid = $user ? $user->getUID() : null;
+ $fileHelper = \OC::$server->getEncryptionFilesHelper();
+ return new Encryption($parameters, $manager, $util, $logger, $fileHelper, $uid);
+ } else {
+ return $storage;
+ }
+ }, 2);
}
}