mirror of
https://github.com/nextcloud/server.git
synced 2026-02-27 18:37:17 +01:00
fix: improve logging around automatic cache updated for dav downloads
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user