reuse share node when creating a share

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2016-09-20 18:00:20 +02:00
parent 7d1e800c15
commit 240538d9e6
No known key found for this signature in database
GPG Key ID: 425003AC385454C5
1 changed files with 3 additions and 0 deletions

View 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 = [