Skip to content

Commit

Permalink
Merge pull request #36360 from nextcloud/new-share-existing-node
Browse files Browse the repository at this point in the history
also set the node when re-using existing share on share create
  • Loading branch information
icewind1991 authored Apr 4, 2023
2 parents 9cae15d + 3473fa3 commit 9d3c8b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/private/Share20/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,11 @@ public function createShare(IShare $share) {
}
} 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
Expand Down

0 comments on commit 9d3c8b7

Please sign in to comment.