aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/SharedMount.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php
index a1a011a9b7d..91f3c39ba05 100644
--- a/apps/files_sharing/lib/SharedMount.php
+++ b/apps/files_sharing/lib/SharedMount.php
@@ -33,7 +33,9 @@ use OC\Files\Filesystem;
use OC\Files\Mount\MountPoint;
use OC\Files\Mount\MoveableMount;
use OC\Files\View;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Storage\IStorageFactory;
+use OCP\Share\Events\VerifyMountPointEvent;
/**
* Shared mount points can be moved by the user
@@ -91,6 +93,12 @@ class SharedMount extends MountPoint implements MoveableMount {
$mountPoint = basename($share->getTarget());
$parent = dirname($share->getTarget());
+ $event = new VerifyMountPointEvent($share, $this->recipientView, $parent);
+ /** @var IEventDispatcher $dispatcher */
+ $dispatcher = \OC::$server->query(IEventDispatcher::class);
+ $dispatcher->dispatchTyped($event);
+ $parent = $event->getParent();
+
if ($folderExistCache->hasKey($parent)) {
$parentExists = $folderExistCache->get($parent);
} else {