diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 1390eedf26e88..595e21825f3dc 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -154,7 +154,7 @@ protected function formatShare(\OCP\Share\IShare $share, Node $recipientNode = n if (empty($nodes)) { // fallback to guessing the path $node = $userFolder->get($share->getTarget()); - if ($node === null) { + if ($node === null || $share->getTarget() === '') { throw new NotFoundException(); } } else {