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);
+ }
}
}