From f37ddad04de297d02244d9523a46f4c91366432b Mon Sep 17 00:00:00 2001 From: Mauro Mura Date: Fri, 5 Dec 2025 13:44:47 +0100 Subject: [PATCH 1/2] Add checks for app data path in Updater.php --- lib/private/Files/Cache/Updater.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/private/Files/Cache/Updater.php b/lib/private/Files/Cache/Updater.php index 1c1fc8b992659..fc024d7d644dd 100644 --- a/lib/private/Files/Cache/Updater.php +++ b/lib/private/Files/Cache/Updater.php @@ -120,6 +120,11 @@ public function update($path, $time = null, ?int $sizeDifference = null) { $sizeDifference = null; } + $appDataPath = 'appdata_' . \OC_Util::getInstanceId() . '/end_to_end_encryption/meta-data'; + if (str_starts_with($path, $appDataPath)) { + return; + } + // scanner didn't provide size info, fallback to full size calculation if ($this->cache instanceof Cache && $sizeDifference === null) { $this->cache->correctFolderSize($path, $data); @@ -147,6 +152,11 @@ public function remove($path) { $this->cache->remove($path); + $appDataPath = 'appdata_' . \OC_Util::getInstanceId() . '/end_to_end_encryption/meta-data'; + if (str_starts_with($path, $appDataPath)) { + return; + } + $this->correctParentStorageMtime($path); if ($entry instanceof ICacheEntry) { $this->propagator->propagateChange($path, time(), -$entry->getSize()); From 238aa3505c3c220040e6f3b2875515b2bf3acfb1 Mon Sep 17 00:00:00 2001 From: Mauro Mura Date: Thu, 11 Dec 2025 08:33:39 +0100 Subject: [PATCH 2/2] Clarify handling of E2E encryption metadata in Updater Added comments to clarify handling of E2E encryption metadata files. --- lib/private/Files/Cache/Updater.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/private/Files/Cache/Updater.php b/lib/private/Files/Cache/Updater.php index fc024d7d644dd..823e32fab78c5 100644 --- a/lib/private/Files/Cache/Updater.php +++ b/lib/private/Files/Cache/Updater.php @@ -119,7 +119,8 @@ public function update($path, $time = null, ?int $sizeDifference = null) { if (isset($data['encrypted']) && (bool)$data['encrypted']) { $sizeDifference = null; } - + + // skip E2E encryption metadata files to avoid interfering with internal encryption handling $appDataPath = 'appdata_' . \OC_Util::getInstanceId() . '/end_to_end_encryption/meta-data'; if (str_starts_with($path, $appDataPath)) { return; @@ -152,6 +153,7 @@ public function remove($path) { $this->cache->remove($path); + // skip E2E encryption metadata files to avoid interfering with internal encryption handling $appDataPath = 'appdata_' . \OC_Util::getInstanceId() . '/end_to_end_encryption/meta-data'; if (str_starts_with($path, $appDataPath)) { return;