From 93ed965cbb1952faafc1ca5e09ee0de84d122c05 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Wed, 30 Mar 2016 23:20:37 +0200 Subject: fix creation of versions of encrypted files on external storages in order to create a 1:1 copy of a file if a version gets created we need to store this information on copyBetweenStorage(). This allows us to by-pass the encryption wrapper if we read the source file. --- tests/lib/traits/encryptiontrait.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/lib/traits/encryptiontrait.php') diff --git a/tests/lib/traits/encryptiontrait.php b/tests/lib/traits/encryptiontrait.php index 92ba3734873..2c1c585d6d4 100644 --- a/tests/lib/traits/encryptiontrait.php +++ b/tests/lib/traits/encryptiontrait.php @@ -8,8 +8,8 @@ namespace Test\Traits; -use OC\Encryption\Util; -use OC\Files\View; +use OC\Encryption\EncryptionWrapper; +use OC\Memcache\ArrayCache; use OCA\Encryption\AppInfo\Application; use OCA\Encryption\KeyManager; use OCA\Encryption\Users\Setup; @@ -68,13 +68,13 @@ trait EncryptionTrait { } protected function postLogin() { - $util = new Util( - new View(), - \OC::$server->getUserManager(), - \OC::$server->getGroupManager(), - \OC::$server->getConfig() + $encryptionWrapper = new EncryptionWrapper( + new ArrayCache(), + \OC::$server->getEncryptionManager(), + \OC::$server->getLogger() ); - $this->registerStorageWrapper('oc_encryption', array($util, 'wrapStorage')); + + $this->registerStorageWrapper('oc_encryption', array($encryptionWrapper, 'wrapStorage')); } protected function setUpEncryptionTrait() { -- cgit v1.2.3