aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-04-04 17:11:24 +0200
committerGitHub <noreply@github.com>2023-04-04 17:11:24 +0200
commit9d3c8b7e7050cecd4efea7a3da1c9341812803e5 (patch)
tree0f63985c43372c47d25e1595b9bf6a1b3064ca6d /lib
parent9cae15d1ad98a006d5d792a4d8579829ff48ff7f (diff)
parent3473fa31870fc848ef44ef03c9b8ff3a3a41f8ce (diff)
downloadnextcloud-server-9d3c8b7e7050cecd4efea7a3da1c9341812803e5.tar.gz
nextcloud-server-9d3c8b7e7050cecd4efea7a3da1c9341812803e5.zip
Merge pull request #36360 from nextcloud/new-share-existing-node
also set the node when re-using existing share on share create
Diffstat (limited to 'lib')
-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