From: Bjoern Schiessle Date: Mon, 16 Dec 2013 14:24:11 +0000 (+0100) Subject: update file cache for target file X-Git-Tag: v7.0.0alpha2~1027^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=95892c8be9c1e5a35e8f31e2ab34d233c69e6c35;p=nextcloud-server.git update file cache for target file --- 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);