Skip to content

Commit

Permalink
Merge pull request #9070 from nextcloud/bugfix/9028/guessing_without_…
Browse files Browse the repository at this point in the history
…target_is_useles

When formatting a share node an Empty target is invalid
  • Loading branch information
MorrisJobke authored Apr 4, 2018
2 parents b90b73d + d6cda3f commit 18676a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 18676a8

Please sign in to comment.