summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2016-09-20 18:00:20 +0200
committerRobin Appelman <robin@icewind.nl>2016-10-12 16:12:36 +0200
commit240538d9e6b12327a6affacbfc744ba51cb70be8 (patch)
treebf6e21a1662f3121a3fbbcdc4f60327a3f1264fb /lib
parent7d1e800c153d362569a1e6f462109212c03f3b0a (diff)
downloadnextcloud-server-240538d9e6b12327a6affacbfc744ba51cb70be8.tar.gz
nextcloud-server-240538d9e6b12327a6affacbfc744ba51cb70be8.zip
reuse share node when creating a share
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Share20/Manager.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index b4fe69a83e2..22cf5a3f65a 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -614,8 +614,11 @@ class Manager implements IManager {
throw new \Exception($error);
}
+ $oldShare = $share;
$provider = $this->factory->getProviderForType($share->getShareType());
$share = $provider->create($share);
+ //reuse the node we already have
+ $share->setNode($oldShare->getNode());
// Post share hook
$postHookData = [