diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-04-30 12:48:16 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-04-30 12:48:16 +0200 |
commit | 57b671ebecfc92388e1a90c9e29eca8427247d0e (patch) | |
tree | a8e9cc55f6e45803d1ae3b20c809ee734b21e42d /apps/files_encryption | |
parent | 6b02126dc1c8ba9de5b87c6c8568feea5948d2a0 (diff) | |
download | nextcloud-server-57b671ebecfc92388e1a90c9e29eca8427247d0e.tar.gz nextcloud-server-57b671ebecfc92388e1a90c9e29eca8427247d0e.zip |
only update the values which really changed
Diffstat (limited to 'apps/files_encryption')
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 03ddc795eae..7be82c313e4 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -340,26 +340,24 @@ class Proxy extends \OC_FileProxy { $fileInfo['unencrypted_size'] = $fixSize; // put file info if not .part file if (!Helper::isPartialFilePath($relativePath)) { - $view->putFileInfo($path, $fileInfo); + $view->putFileInfo($path, array('unencrypted_size' => $fixSize)); } } $size = $fileInfo['unencrypted_size']; } else { - // self healing if file was removed from file cache - if (!$fileInfo) { - $fileInfo = array(); - } + + $fileInfoUpdates = array(); $fixSize = $util->getFileSize($path); if ($fixSize > 0) { $size = $fixSize; - $fileInfo['encrypted'] = true; - $fileInfo['unencrypted_size'] = $size; + $fileInfoUpdates['encrypted'] = true; + $fileInfoUpdates['unencrypted_size'] = $size; // put file info if not .part file if (!Helper::isPartialFilePath($relativePath)) { - $view->putFileInfo($path, $fileInfo); + $view->putFileInfo($path, $fileInfoUpdates); } } |