diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-01-07 18:13:35 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-01-15 15:36:52 +0100 |
commit | ddbbe1742fda9b508da5c6369dc2a2d5e19cec95 (patch) | |
tree | b69d7c4e73212e7d08cbf40dd8f66d3b85e537c0 /lib/private/files/cache/updater.php | |
parent | fcec704174a384f93214a1f2b83bed385e763ff6 (diff) | |
download | nextcloud-server-ddbbe1742fda9b508da5c6369dc2a2d5e19cec95.tar.gz nextcloud-server-ddbbe1742fda9b508da5c6369dc2a2d5e19cec95.zip |
propagate folder size in the same query for write updates
Diffstat (limited to 'lib/private/files/cache/updater.php')
-rw-r--r-- | lib/private/files/cache/updater.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/private/files/cache/updater.php b/lib/private/files/cache/updater.php index 58d8e53cfd1..80ba704883e 100644 --- a/lib/private/files/cache/updater.php +++ b/lib/private/files/cache/updater.php @@ -118,9 +118,15 @@ class Updater implements IUpdater { } $data = $this->scanner->scan($path, Scanner::SCAN_SHALLOW, -1, false); + if (isset($data['oldSize']) && isset($data['size'])) { + $sizeDifference = $data['size'] - $data['oldSize']; + } else { + // scanner didn't provide size info, fallback to full size calculation + $sizeDifference = 0; + $this->cache->correctFolderSize($path, $data); + } $this->correctParentStorageMtime($path); - $this->cache->correctFolderSize($path, $data); - $this->propagator->propagateChange($path, $time); + $this->propagator->propagateChange($path, $time, $sizeDifference); } /** |