From f5c9d3e6fdf36d3cd47243b470ed4ed767fe5dbd Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 14 Nov 2024 15:18:06 +0100 Subject: [PATCH] debug: log invalid data being used in scanner Signed-off-by: Robin Appelman --- lib/private/Files/Cache/Scanner.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php index 3bd674f79e2..591526492de 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -133,6 +133,10 @@ class Scanner extends BasicEmitter implements IScanner { try { $data = $data ?? $this->getData($file); + if (!isset($data['mimetype'])) { + $logger = \OC::$server->get(LoggerInterface::class); + $logger->error("invalid data in scanner. path: $file, storage: " . $this->storage->getId() . ', data: ' . json_encode($data)); + } } catch (ForbiddenException $e) { if ($lock) { if ($this->storage->instanceOfStorage(ILockingStorage::class)) { -- 2.39.5