diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-12-16 18:24:11 +0400 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-12-16 20:49:14 +0400 |
commit | 3160b23291640799d7f6e205c92456f87ba65f06 (patch) | |
tree | 67a36d72a49c877892902e2185d5c402bcdd0bf7 /apps/files_encryption | |
parent | 73a0b690e94a11a48f952076e4829f2f931533be (diff) |
update file cache for target file
Diffstat (limited to 'apps/files_encryption')
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 9 |
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); |