[Pkg-owncloud-commits] [owncloud] 11/104: update file cache for target file

David Prévot taffit at moszumanska.debian.org
Sat Jan 18 13:33:36 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 3160b23291640799d7f6e205c92456f87ba65f06
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date:   Mon Dec 16 15:24:11 2013 +0100

    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 4a41c97..9666749 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);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list