diff options
author | Florin Peter <github@florin-peter.de> | 2013-05-22 02:02:42 +0200 |
---|---|---|
committer | Florin Peter <github@florin-peter.de> | 2013-05-22 02:02:42 +0200 |
commit | c6722581f982d05909664171bd66cc7ec2a2a67b (patch) | |
tree | 72a3084a6838bfd52a977221230c50f82a97d753 | |
parent | 28d72b822deadd9d4e510eefd3a0f76ebdf236ec (diff) | |
download | nextcloud-server-c6722581f982d05909664171bd66cc7ec2a2a67b.tar.gz nextcloud-server-c6722581f982d05909664171bd66cc7ec2a2a67b.zip |
fix pgsql error
-rw-r--r-- | apps/files_encryption/lib/util.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php index 1f4609ae2f6..784d74bd759 100644 --- a/apps/files_encryption/lib/util.php +++ b/apps/files_encryption/lib/util.php @@ -706,13 +706,16 @@ class Util // NOTE: Stream{} will be invoked for handling // the encryption, and should handle all keys // and their generation etc. automatically - $size = stream_copy_to_stream($plainHandle2, $encHandle); + stream_copy_to_stream($plainHandle2, $encHandle); + + // get file size + $size = $this->view->filesize($rawPath . '.plaintmp'); // Delete temporary plain copy of file $this->view->unlink($rawPath . '.plaintmp'); // Add the file to the cache - \OC\Files\Filesystem::putFileInfo($plainFile['path'], array('encrypted' => true, 'size' => $size), ''); + \OC\Files\Filesystem::putFileInfo($plainFile['path'], array('encrypted' => true, 'size' => $size, 'unencrypted_size' => $size)); } // Encrypt legacy encrypted files |