summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-04-01 17:22:29 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:30 +0200
commita74ee674768cec92c85d313a27ea0c2de5aa29c1 (patch)
treeb87f0acb568c373e31cbef2fabfb22c307ccb1e6 /lib/private
parent5ea94b7c45e26e535375fbbf158840629089d98c (diff)
downloadnextcloud-server-a74ee674768cec92c85d313a27ea0c2de5aa29c1.tar.gz
nextcloud-server-a74ee674768cec92c85d313a27ea0c2de5aa29c1.zip
don't wrap share storages
Diffstat (limited to 'lib/private')
-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);
}
}