From 983336c36c1112c63489ebe1b59eafda49910345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20M=C3=BCller?= Date: Mon, 22 Jan 2024 20:48:34 +0100 Subject: [PATCH] fix(preview): Check if node id is null before deleting the preview folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcel Müller --- lib/private/Preview/Watcher.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/private/Preview/Watcher.php b/lib/private/Preview/Watcher.php index 7f4593f9fe3c9..ad6fed560203b 100644 --- a/lib/private/Preview/Watcher.php +++ b/lib/private/Preview/Watcher.php @@ -61,6 +61,9 @@ protected function deleteNode(Node $node) { } try { + if (is_null($node->getId())) { + return; + } $folder = $this->appData->getFolder((string)$node->getId()); $folder->delete(); } catch (NotFoundException $e) {