aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-03-18 13:36:46 +0100
committerGitHub <noreply@github.com>2020-03-18 13:36:46 +0100
commit557c4966a02bd06d60f9896658b3cac99c091c85 (patch)
tree7cd69fbdc4b34ffe34bf5f8a117e9fff888097e9 /lib
parent7d5b0c290dbaee2385dc36ee7578a0ec3cf7a820 (diff)
parentb944115a3524bacc9f321df38b52e4c9ea92beac (diff)
downloadnextcloud-server-557c4966a02bd06d60f9896658b3cac99c091c85.tar.gz
nextcloud-server-557c4966a02bd06d60f9896658b3cac99c091c85.zip
Merge pull request #19981 from nextcloud/enh/reset_target_if_null_after_share
Update the target when it isempty after sharing
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/Manager.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index ca668e24e7f..82e948344c1 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -784,6 +784,11 @@ class Manager implements IManager {
//reuse the node we already have
$share->setNode($oldShare->getNode());
+ // Reset the target if it is null for the new share
+ if ($share->getTarget() === '') {
+ $share->setTarget($target);
+ }
+
// Post share event
$event = new GenericEvent($share);
$this->legacyDispatcher->dispatch('OCP\Share::postShare', $event);