don't wrap share storages

This commit is contained in:
Bjoern Schiessle 2015-04-01 17:22:29 +02:00 committed by Thomas Müller
parent 5ea94b7c45
commit a74ee67476
1 changed files with 14 additions and 11 deletions

View File

@ -185,16 +185,19 @@ class Manager implements \OCP\Encryption\IManager {
'storage' => $storage,
'mountPoint' => $mountPoint,
'mount' => $mount];
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());
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);
}
}