diff --git a/apps/files_sharing/lib/MountProvider.php b/apps/files_sharing/lib/MountProvider.php index 2ad7ede8e40a6..ffdbd3006f278 100644 --- a/apps/files_sharing/lib/MountProvider.php +++ b/apps/files_sharing/lib/MountProvider.php @@ -33,6 +33,7 @@ use OCA\Files_Sharing\Event\ShareMountedEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Config\IMountProvider; +use OCP\Files\NotFoundException; use OCP\Files\Storage\IStorageFactory; use OCP\ICacheFactory; use OCP\IConfig; @@ -129,6 +130,13 @@ public function getMountsForUser(IUser $user, IStorageFactory $loader) { if (!isset($ownerViews[$owner])) { $ownerViews[$owner] = new View('/' . $parentShare->getShareOwner() . '/files'); } + + try { + $ownerViews[$owner]->getPath($parentShare->getNodeId()); + } catch (NotFoundException $e) { + continue; + } + $mount = new SharedMount( '\OCA\Files_Sharing\SharedStorage', $mounts,