aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2022-12-12 18:27:50 +0100
committerLouis (Rebase PR Action) <artonge@users.noreply.github.com>2023-01-26 10:12:23 +0000
commit53d736207c87485763f5cbfd04a4ea3067b6606d (patch)
tree55027bdce4f1d1307b3fc52ad961eaa45fe3737f /lib
parent2ce4ac4aa4495712692a8c7e02318c8735f8465f (diff)
downloadnextcloud-server-53d736207c87485763f5cbfd04a4ea3067b6606d.tar.gz
nextcloud-server-53d736207c87485763f5cbfd04a4ea3067b6606d.zip
Adapt files_versions tests to modernized hooks
Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'lib')
-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 6ccae9903dc..dc3579d5fd4 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;
@@ -49,6 +51,10 @@ class FileReferenceEventListener implements \OCP\EventDispatcher\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) {