summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
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);