From 84ff5760e07c7fa84ed88ca0d142bc0d99ec211a Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 23 Feb 2026 17:45:35 +0100 Subject: [PATCH] fix: improve logging around automatic cache updated for dav downloads Signed-off-by: Robin Appelman --- apps/dav/lib/Connector/Sabre/File.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php index 109440eea4c..622264065cc 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -482,9 +482,10 @@ class File extends Node implements IFile { // comparing current file size with the one in DB // if different, fix DB and refresh cache. - if ($this->getSize() !== $this->fileView->filesize($this->getPath())) { + $fsSize = $this->fileView->filesize($this->getPath()); + if ($this->getSize() !== $fsSize) { $logger = Server::get(LoggerInterface::class); - $logger->warning('fixing cached size of file id=' . $this->getId()); + $logger->warning('fixing cached size of file id=' . $this->getId() . ', cached size was ' . $this->getSize() . ', but the filesystem reported a size of ' . $fsSize); $this->getFileInfo()->getStorage()->getUpdater()->update($this->getFileInfo()->getInternalPath()); $this->refreshInfo();