summaryrefslogtreecommitdiffstats
path: root/lib/private/Share20
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-01-25 17:06:17 +0100
committerRobin Appelman <robin@icewind.nl>2023-04-03 16:40:47 +0200
commit3473fa31870fc848ef44ef03c9b8ff3a3a41f8ce (patch)
tree55e1fa97720908e19448974ac81878c8572e7388 /lib/private/Share20
parenta1aa4491acac6217061a1cecc8cb9d807292376c (diff)
downloadnextcloud-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.php4
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