summaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/wrapper/encryption.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files/storage/wrapper/encryption.php')
-rw-r--r--lib/private/files/storage/wrapper/encryption.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php
index 61290791faa..155a4fde4ef 100644
--- a/lib/private/files/storage/wrapper/encryption.php
+++ b/lib/private/files/storage/wrapper/encryption.php
@@ -419,10 +419,11 @@ class Encryption extends Wrapper {
}
if ($shouldEncrypt === true && $encryptionModule !== null) {
+ $headerSize = $this->getHeaderSize($path);
$source = $this->storage->fopen($path, $mode);
$handle = \OC\Files\Stream\Encryption::wrap($source, $path, $fullPath, $header,
$this->uid, $encryptionModule, $this->storage, $this, $this->util, $this->fileHelper, $mode,
- $size, $unencryptedSize, $this->getHeaderSize($path));
+ $size, $unencryptedSize, $headerSize);
return $handle;
}