From 44e4fc5d419ffc9f5e2abf37489636f7e30cbd54 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Sun, 15 Dec 2024 17:31:57 +0100 Subject: [PATCH] Revert "fix: don't recalculate folder size in Cache::delete if the entry didn't exist" This reverts commit 5ca9d884d78fd4439a74dde02fdcafb3ac7a40f4. Signed-off-by: Daniel Kesselberg --- build/psalm-baseline.xml | 5 +++++ lib/private/Files/Cache/Updater.php | 3 +++ 2 files changed, 8 insertions(+) diff --git a/build/psalm-baseline.xml b/build/psalm-baseline.xml index 3072407ef54ad..00add5ee78efb 100644 --- a/build/psalm-baseline.xml +++ b/build/psalm-baseline.xml @@ -1830,6 +1830,11 @@ getStorageInfo($storageId)]]> + + + cache instanceof Cache]]> + + diff --git a/lib/private/Files/Cache/Updater.php b/lib/private/Files/Cache/Updater.php index 6cf3bd096d8db..42812dbc8822e 100644 --- a/lib/private/Files/Cache/Updater.php +++ b/lib/private/Files/Cache/Updater.php @@ -152,6 +152,9 @@ public function remove($path) { $this->propagator->propagateChange($path, time(), -$entry->getSize()); } else { $this->propagator->propagateChange($path, time()); + if ($this->cache instanceof Cache) { + $this->cache->correctFolderSize($parent); + } } }