diff options
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Encryption/Manager.php | 7 |
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); + } } |