summaryrefslogtreecommitdiffstats
path: root/apps/encryption
diff options
context:
space:
mode:
Diffstat (limited to 'apps/encryption')
-rw-r--r--apps/encryption/lib/crypto/encryption.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/encryption/lib/crypto/encryption.php b/apps/encryption/lib/crypto/encryption.php
index 4843284f7a3..dc60c094784 100644
--- a/apps/encryption/lib/crypto/encryption.php
+++ b/apps/encryption/lib/crypto/encryption.php
@@ -192,10 +192,10 @@ class Encryption implements IEncryptionModule {
}
}
- if (isset($header['cipher'])) {
- $this->cipher = $header['cipher'];
- } elseif ($this->isWriteOperation) {
+ if ($this->isWriteOperation) {
$this->cipher = $this->crypt->getCipher();
+ } elseif (isset($header['cipher'])) {
+ $this->cipher = $header['cipher'];
} else {
// if we read a file without a header we fall-back to the legacy cipher
// which was used in <=oC6