diff options
author | Robin Appelman <robin@icewind.nl> | 2023-01-25 17:06:17 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2023-04-03 16:40:47 +0200 |
commit | 3473fa31870fc848ef44ef03c9b8ff3a3a41f8ce (patch) | |
tree | 55e1fa97720908e19448974ac81878c8572e7388 /lib/private/Share20 | |
parent | a1aa4491acac6217061a1cecc8cb9d807292376c (diff) | |
download | nextcloud-server-3473fa31870fc848ef44ef03c9b8ff3a3a41f8ce.tar.gz nextcloud-server-3473fa31870fc848ef44ef03c9b8ff3a3a41f8ce.zip |
also set the node when re-using existing share on share create
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Share20')
-rw-r--r-- | lib/private/Share20/Manager.php | 4 |
1 files changed, 4 insertions, 0 deletions
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 |