summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-03-30 17:13:42 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:28 +0200
commitd185761d31f4845e9bf39dbbe0c61d199689deb7 (patch)
treeae8e536abca87e2413d48e34975234bd3c2e2dff /lib/private
parent4441835d189d037a021ba9a11fd96cf55ba2db3f (diff)
downloadnextcloud-server-d185761d31f4845e9bf39dbbe0c61d199689deb7.tar.gz
nextcloud-server-d185761d31f4845e9bf39dbbe0c61d199689deb7.zip
initializing some variables + update size after writing the headers
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/files/stream/encryption.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/files/stream/encryption.php b/lib/private/files/stream/encryption.php
index 3e8c3a912da..df74eeff893 100644
--- a/lib/private/files/stream/encryption.php
+++ b/lib/private/files/stream/encryption.php
@@ -271,8 +271,7 @@ class Encryption extends Wrapper {
public function stream_write($data) {
if ($this->position === 0) {
- $this->writeHeader();
- $this->size+=$this->util->getBlockSize();
+ $this->size+=$this->writeHeader();
}
$length = 0;
@@ -411,11 +410,12 @@ class Encryption extends Wrapper {
/**
* write header at beginning of encrypted file
*
+ * @return integer
* @throws EncryptionHeaderKeyExistsException if header key is already in use
*/
private function writeHeader() {
$header = $this->util->createHeader($this->newHeader, $this->encryptionModule);
- parent::stream_write($header);
+ return parent::stream_write($header);
}
}