summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib/stream.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_encryption/lib/stream.php')
-rw-r--r--apps/files_encryption/lib/stream.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php
index fe85b2eac4a..1186a5f1d8d 100644
--- a/apps/files_encryption/lib/stream.php
+++ b/apps/files_encryption/lib/stream.php
@@ -250,7 +250,7 @@ class Stream {
// Fetch and decrypt keyfile
// Fetch existing keyfile
- $this->encKeyfile = Keymanager::getFileKey($this->rootView, $this->userId, $this->relPath);
+ $this->encKeyfile = Keymanager::getFileKey($this->rootView, $this->relPath);
// If a keyfile already exists
if ($this->encKeyfile) {
@@ -485,13 +485,14 @@ class Stream {
}
// if private key is not valid redirect user to a error page
- \OCA\Encryption\Helper::redirectToErrorPage();
+ \OCA\Encryption\Helper::redirectToErrorPage($this->session);
}
if (
$this->meta['mode'] !== 'r' &&
$this->meta['mode'] !== 'rb' &&
- $this->size > 0
+ $this->size > 0 &&
+ $this->unencryptedSize > 0
) {
// only write keyfiles if it was a new file