When formatting a share node an Empty target is invalid

Fixes #9028

For federated shares the share table holds no target information (since
it is on the other server). So when a node is actually invalid and not
found we should not display it anymore in the shared with sections etc
and thus throw the proper exceptions.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2018-04-04 11:33:05 +02:00
parent e95184ee25
commit 36bd4b7dde
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ class ShareAPIController extends OCSController {
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 {