aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_encryption/lib')
-rw-r--r--apps/files_encryption/lib/proxy.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index 4a41c978139..96667493a51 100644
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -114,6 +114,15 @@ class Proxy extends \OC_FileProxy {
// get encrypted content
$data = $view->file_get_contents($tmpPath);
+ // update file cache for target file
+ $tmpFileInfo = $view->getFileInfo($tmpPath);
+ $fileInfo = $view->getFileInfo($path);
+ if (is_array($fileInfo) && is_array($tmpFileInfo)) {
+ $fileInfo['encrypted'] = true;
+ $fileInfo['unencrypted_size'] = $tmpFileInfo['size'];
+ $view->putFileInfo($path, $fileInfo);
+ }
+
// remove our temp file
$view->deleteAll('/' . \OCP\User::getUser() . '/cache/' . $cacheFolder);