From f9cda54cbf5559372b0e9e22dac41483c18a6988 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Thu, 21 Nov 2024 17:13:24 +0100 Subject: fix: Wrap partial cache entry in CacheEntry Because it is returned here: https://github.com/nextcloud/server/blob/7b7d07c5750583ab3a7b29112af475f5c8891143/lib/private/Files/Cache/Cache.php#L136-L137 And some implementation got stricter: https://github.com/nextcloud/groupfolders/blob/df95bf6ba807da5171de91108879b6d8aa9f3611/lib/Mount/RootEntryCache.php#L23-L28 Signed-off-by: Louis Chemineau --- lib/private/Files/Cache/Cache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/private/Files/Cache') diff --git a/lib/private/Files/Cache/Cache.php b/lib/private/Files/Cache/Cache.php index 59d5a838d72..da798af46cd 100644 --- a/lib/private/Files/Cache/Cache.php +++ b/lib/private/Files/Cache/Cache.php @@ -249,14 +249,14 @@ class Cache implements ICache { $file = $this->normalize($file); if (isset($this->partial[$file])) { //add any saved partial data - $data = array_merge($this->partial[$file], $data); + $data = array_merge($this->partial[$file]->getData(), $data); unset($this->partial[$file]); } $requiredFields = ['size', 'mtime', 'mimetype']; foreach ($requiredFields as $field) { if (!isset($data[$field])) { //data not complete save as partial and return - $this->partial[$file] = $data; + $this->partial[$file] = new CacheEntry($data); return -1; } } -- cgit v1.2.3