From 3473fa31870fc848ef44ef03c9b8ff3a3a41f8ce Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 25 Jan 2023 17:06:17 +0100 Subject: also set the node when re-using existing share on share create Signed-off-by: Robin Appelman --- lib/private/Share20/Manager.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib') diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index f84ed1671ba..1661b1d6a61 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -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 -- cgit v1.2.3