summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2017-03-31 14:49:38 +0200
committerGitHub <noreply@github.com>2017-03-31 14:49:38 +0200
commit85da9378c0a46840b53d7c90bb88996bd62e7677 (patch)
tree4ea023a4d8ede18ca8a1e419d014f73f56cb25dd /lib
parent6a6300b1f20116088c3d7e09d5e4d8a6ed6fc57e (diff)
parent7d4c4224d109331fe10c147ac72fc3b0a3aaee32 (diff)
downloadnextcloud-server-85da9378c0a46840b53d7c90bb88996bd62e7677.tar.gz
nextcloud-server-85da9378c0a46840b53d7c90bb88996bd62e7677.zip
Merge pull request #4140 from nextcloud/no_encryption_no_wrapper
Don't add the Encryption Storage Wrapper if there are no encryption modules
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Encryption/Manager.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/Encryption/Manager.php b/lib/private/Encryption/Manager.php
index 4d40675801e..9053e371b65 100644
--- a/lib/private/Encryption/Manager.php
+++ b/lib/private/Encryption/Manager.php
@@ -254,8 +254,11 @@ class Manager implements IManager {
* Add storage wrapper
*/
public function setupStorage() {
- $encryptionWrapper = new EncryptionWrapper($this->arrayCache, $this, $this->logger);
- Filesystem::addStorageWrapper('oc_encryption', array($encryptionWrapper, 'wrapStorage'), 2);
+ // If encryption is disabled and there are no loaded modules it makes no sense to load the wrapper
+ if (!empty($this->encryptionModules) || $this->isEnabled()) {
+ $encryptionWrapper = new EncryptionWrapper($this->arrayCache, $this, $this->logger);
+ Filesystem::addStorageWrapper('oc_encryption', array($encryptionWrapper, 'wrapStorage'), 2);
+ }
}