Skip to content

Commit

Permalink
fix: Skip registering mount points for missing owner node
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliushaertl authored and max-nextcloud committed Apr 20, 2023
1 parent c909e92 commit 8c6703f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/files_sharing/lib/MountProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8c6703f

Please sign in to comment.