diff options
author | Louis <6653109+artonge@users.noreply.github.com> | 2023-01-30 10:40:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 10:40:49 +0100 |
commit | 2f3007205d11732e931615ab1bf71620321ed64a (patch) | |
tree | 6061c638f220f46c62f859689e6e4977eecb32be /lib/private/Collaboration | |
parent | de415fbb15d6c5cceca7b05261947d573a7a512c (diff) | |
parent | 552f5b0171ab071e9696414e05105791875f51fb (diff) | |
download | nextcloud-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.php | 6 |
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) { |