From 9e353f6289af425769b2913d51eacc4fdf473dd8 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 13 Dec 2016 22:28:09 +0100 Subject: [PATCH] Fix overwriting parameter Fixes #2641 Signed-off-by: Roeland Jago Douma --- apps/files_sharing/lib/SharedMount.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files_sharing/lib/SharedMount.php b/apps/files_sharing/lib/SharedMount.php index b7fb96b711b..2ef5e15b778 100644 --- a/apps/files_sharing/lib/SharedMount.php +++ b/apps/files_sharing/lib/SharedMount.php @@ -115,9 +115,9 @@ class SharedMount extends MountPoint implements MoveableMount { private function updateFileTarget($newPath, &$share) { $share->setTarget($newPath); - foreach ($this->groupedShares as $share) { - $share->setTarget($newPath); - \OC::$server->getShareManager()->moveShare($share, $this->user); + foreach ($this->groupedShares as $tmpShare) { + $tmpShare->setTarget($newPath); + \OC::$server->getShareManager()->moveShare($tmpShare, $this->user); } } -- 2.39.5