From 8c6703f29401aaf3141552a6a92b42959c481f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 28 Mar 2023 11:26:24 +0200 Subject: [PATCH] fix: Skip registering mount points for missing owner node MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files_sharing/lib/MountProvider.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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,