From d86976c78d079c6660f228c7494fe6dd12cc4a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 22 Jul 2024 11:33:50 +0200 Subject: [PATCH] fix: Do not return partial file info if we have a cache entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Files/View.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index c74206f6ee322..323266e8cfa11 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1338,9 +1338,6 @@ public function getFileInfo($path, $includeMountPoints = true) { if (!Filesystem::isValidPath($path)) { return false; } - if (Cache\Scanner::isPartialFile($path)) { - return $this->getPartFileInfo($path); - } $relativePath = $path; $path = Filesystem::normalizePath($this->fakeRoot . '/' . $path); @@ -1351,6 +1348,10 @@ public function getFileInfo($path, $includeMountPoints = true) { $data = $this->getCacheEntry($storage, $internalPath, $relativePath); if (!$data instanceof ICacheEntry) { + if (Cache\Scanner::isPartialFile($relativePath)) { + return $this->getPartFileInfo($relativePath); + } + return false; }