summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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