]> source.dussan.org Git - nextcloud-server.git/commitdiff
reuse share node when creating a share
authorRobin Appelman <robin@icewind.nl>
Tue, 20 Sep 2016 16:00:20 +0000 (18:00 +0200)
committerRobin Appelman <robin@icewind.nl>
Wed, 12 Oct 2016 14:12:36 +0000 (16:12 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/Share20/Manager.php

index b4fe69a83e271dadada88be0ba33e59d67386892..22cf5a3f65a4c935f4dc8e0048e2bc5817e3f795 100644 (file)
@@ -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 = [