diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-10-27 12:51:52 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-11-07 15:20:52 +0100 |
commit | 2af7256267c8b16efcf68fec45c612d8c64c0c1d (patch) | |
tree | 765d62374722c958713d28fd69fc5c41e847086e /apps | |
parent | f27b6b0ab87b041229d564bbbabcd86a98dc6325 (diff) | |
download | nextcloud-server-2af7256267c8b16efcf68fec45c612d8c64c0c1d.tar.gz nextcloud-server-2af7256267c8b16efcf68fec45c612d8c64c0c1d.zip |
only set the values we need and make sure that we write the file info for both
the real file and the part file, because some information from the part file
might be needed later
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_encryption/lib/stream.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php index 046c38152b8..931aa08cb2c 100644 --- a/apps/files_encryption/lib/stream.php +++ b/apps/files_encryption/lib/stream.php @@ -637,13 +637,17 @@ class Stream { $path = Helper::stripPartialFileExtension($this->rawPath); $fileInfo = array( + 'mimetype' => $this->rootView->getMimeType($this->rawPath), 'encrypted' => true, - 'size' => $this->size, 'unencrypted_size' => $this->unencryptedSize, ); - // set fileinfo - $this->rootView->putFileInfo($path, $fileInfo); + // if we write a part file we also store the unencrypted size for + // the part file so that it can be re-used later + $this->rootView->putFileInfo($this->rawPath, $fileInfo); + if ($path !== $this->rawPath) { + $this->rootView->putFileInfo($path, $fileInfo); + } } |