diff options
Diffstat (limited to 'apps/files_encryption/lib/stream.php')
-rw-r--r-- | apps/files_encryption/lib/stream.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php index 1738955d1aa..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) { @@ -491,7 +491,8 @@ class Stream { 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 |