Merge pull request #20018 from nextcloud/backport/19981/stable16
[stable16] Update the target when it isempty after sharing
This commit is contained in:
commit
220bf00bf6
|
@ -695,6 +695,11 @@ class Manager implements IManager {
|
||||||
//reuse the node we already have
|
//reuse the node we already have
|
||||||
$share->setNode($oldShare->getNode());
|
$share->setNode($oldShare->getNode());
|
||||||
|
|
||||||
|
// Reset the target if it is null for the new share
|
||||||
|
if ($share->getTarget() === '') {
|
||||||
|
$share->setTarget($target);
|
||||||
|
}
|
||||||
|
|
||||||
// Post share event
|
// Post share event
|
||||||
$event = new GenericEvent($share);
|
$event = new GenericEvent($share);
|
||||||
$this->eventDispatcher->dispatch('OCP\Share::postShare', $event);
|
$this->eventDispatcher->dispatch('OCP\Share::postShare', $event);
|
||||||
|
|
Loading…
Reference in New Issue