Merge pull request #36360 from nextcloud/new-share-existing-node

also set the node when re-using existing share on share create
pull/37513/head
Robin Appelman 2023-04-04 17:11:24 +07:00 committed by GitHub
commit 9d3c8b7e70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

@ -825,7 +825,11 @@ class Manager implements IManager {
}
} catch (AlreadySharedException $e) {
// if a share for the same target already exists, dont create a new one, but do trigger the hooks and notifications again
$oldShare = $share;
// Reuse the node we already have
$share = $e->getExistingShare();
$share->setNode($oldShare->getNode());
}
// Post share event