summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Files/Cache/Updater.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/private/Files/Cache/Updater.php b/lib/private/Files/Cache/Updater.php
index 4e17c4d778d..361db4b3f85 100644
--- a/lib/private/Files/Cache/Updater.php
+++ b/lib/private/Files/Cache/Updater.php
@@ -25,6 +25,8 @@
*/
namespace OC\Files\Cache;
+
+use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Cache\IUpdater;
use OCP\Files\Storage\IStorage;
@@ -150,12 +152,20 @@ class Updater implements IUpdater {
$parent = '';
}
+ $entry = $this->cache->get($path);
+
$this->cache->remove($path);
- if ($this->cache instanceof Cache) {
- $this->cache->correctFolderSize($parent);
- }
+
$this->correctParentStorageMtime($path);
- $this->propagator->propagateChange($path, time());
+ if ($entry instanceof ICacheEntry) {
+ $this->propagator->propagateChange($path, time(), -$entry->getSize());
+ } else {
+ $this->propagator->propagateChange($path, time());
+ if ($this->cache instanceof Cache) {
+ $this->cache->correctFolderSize($parent);
+ }
+ }
+
}
/**