mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #19981 from nextcloud/enh/reset_target_if_null_after_share
Update the target when it isempty after sharing
This commit is contained in:
commit
557c4966a0
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue