From 95892c8be9c1e5a35e8f31e2ab34d233c69e6c35 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 16 Dec 2013 15:24:11 +0100 Subject: [PATCH] update file cache for target file --- apps/files_encryption/lib/proxy.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 4a41c97813..96667493a5 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);