update file cache for target file

This commit is contained in:
Bjoern Schiessle 2013-12-16 15:24:11 +01:00
parent cdd816c930
commit 95892c8be9

View file

@ -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);