aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Collaboration
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Collaboration')
-rw-r--r--lib/private/Collaboration/Reference/File/FileReferenceEventListener.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/Collaboration/Reference/File/FileReferenceEventListener.php b/lib/private/Collaboration/Reference/File/FileReferenceEventListener.php
index cb53b496406..1dbe8e3bc35 100644
--- a/lib/private/Collaboration/Reference/File/FileReferenceEventListener.php
+++ b/lib/private/Collaboration/Reference/File/FileReferenceEventListener.php
@@ -24,6 +24,8 @@ declare(strict_types=1);
namespace OC\Collaboration\Reference\File;
+use OC\Files\Node\NonExistingFile;
+use OC\Files\Node\NonExistingFolder;
use OCP\Collaboration\Reference\IReferenceManager;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventDispatcher;
@@ -51,6 +53,10 @@ class FileReferenceEventListener implements IEventListener {
*/
public function handle(Event $event): void {
if ($event instanceof NodeDeletedEvent) {
+ if ($event->getNode() instanceof NonExistingFolder || $event->getNode() instanceof NonExistingFile) {
+ return;
+ }
+
$this->manager->invalidateCache((string)$event->getNode()->getId());
}
if ($event instanceof ShareDeletedEvent) {