diff options
Diffstat (limited to 'lib/private/files/storage/wrapper')
-rw-r--r-- | lib/private/files/storage/wrapper/encryption.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php index 0dc59cbb2a0..af48d3475c3 100644 --- a/lib/private/files/storage/wrapper/encryption.php +++ b/lib/private/files/storage/wrapper/encryption.php @@ -311,12 +311,10 @@ class Encryption extends Wrapper { || $mode === 'wb' || $mode === 'wb+' ) { - if (!empty($encryptionModuleId)) { + if ($encryptionEnabled) { + // if $encryptionModuleId is empty, the default module will be used $encryptionModule = $this->encryptionManager->getEncryptionModule($encryptionModuleId); $shouldEncrypt = $encryptionModule->shouldEncrypt($fullPath); - } elseif ($encryptionEnabled) { - $encryptionModule = $this->encryptionManager->getDefaultEncryptionModule(); - $shouldEncrypt = $encryptionModule->shouldEncrypt($fullPath); } } else { // only get encryption module if we found one in the header |