From be32a231209d75a44b612ea88b1c6184fab85322 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Tue, 25 Jun 2024 10:44:28 +0200 Subject: [PATCH] fix(Classifier): fix wrong str_contains usage Signed-off-by: Marcel Klehr --- lib/Hooks/FileListener.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Hooks/FileListener.php b/lib/Hooks/FileListener.php index 00953380..4944124c 100644 --- a/lib/Hooks/FileListener.php +++ b/lib/Hooks/FileListener.php @@ -218,7 +218,7 @@ public function handle(Event $event): void { if ($node instanceof Folder) { return; } - if (!str_contains('external', $node->getMountPoint()->getMountType())) { + if (!str_contains($node->getMountPoint()->getMountType(), 'external')) { return; } if (in_array($node->getName(), [...Constants::IGNORE_MARKERS_ALL, ...Constants::IGNORE_MARKERS_IMAGE, ...Constants::IGNORE_MARKERS_AUDIO, ...Constants::IGNORE_MARKERS_VIDEO], true)) { @@ -295,6 +295,7 @@ public function postDelete(Node $node, bool $recurse = true): void { * @throws \OCP\Files\InvalidPathException */ public function postInsert(Node $node, bool $recurse = true): void { + throw new \Exception('postInsert'); if ($node->getType() === FileInfo::TYPE_FOLDER) { if (!$recurse) { return;