aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Collaboration
diff options
context:
space:
mode:
authorLouis <6653109+artonge@users.noreply.github.com>2023-01-30 10:40:49 +0100
committerGitHub <noreply@github.com>2023-01-30 10:40:49 +0100
commit2f3007205d11732e931615ab1bf71620321ed64a (patch)
tree6061c638f220f46c62f859689e6e4977eecb32be /lib/private/Collaboration
parentde415fbb15d6c5cceca7b05261947d573a7a512c (diff)
parent552f5b0171ab071e9696414e05105791875f51fb (diff)
downloadnextcloud-server-2f3007205d11732e931615ab1bf71620321ed64a.tar.gz
nextcloud-server-2f3007205d11732e931615ab1bf71620321ed64a.zip
Merge pull request #35160 from nextcloud/artonge/feat/version_naming_backend
Allow to name a version
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) {