diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-11-04 15:16:58 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2014-11-06 18:31:40 +0100 |
commit | 7ecd2207157efffabdf5ec8f36c6f4accc348fc4 (patch) | |
tree | 4442d98174d010328449f21b49fc812b905d383a /apps/files_sharing/lib/sharedmount.php | |
parent | 9c79c2fa17be40a6c7b8212c6e7a89c2f6470d04 (diff) | |
download | nextcloud-server-7ecd2207157efffabdf5ec8f36c6f4accc348fc4.tar.gz nextcloud-server-7ecd2207157efffabdf5ec8f36c6f4accc348fc4.zip |
Setup shared mounts for the correct user when setting up the filesystem for the non-logged in user
Diffstat (limited to 'apps/files_sharing/lib/sharedmount.php')
-rw-r--r-- | apps/files_sharing/lib/sharedmount.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_sharing/lib/sharedmount.php b/apps/files_sharing/lib/sharedmount.php index 4ad2d4e6b3e..a93ecfb3b1b 100644 --- a/apps/files_sharing/lib/sharedmount.php +++ b/apps/files_sharing/lib/sharedmount.php @@ -22,15 +22,15 @@ class SharedMount extends Mount implements MoveableMount { public function __construct($storage, $mountpoint, $arguments = null, $loader = null) { // first update the mount point before creating the parent - $newMountPoint = self::verifyMountPoint($arguments['share']); - $absMountPoint = '/' . \OCP\User::getUser() . '/files' . $newMountPoint; + $newMountPoint = $this->verifyMountPoint($arguments['share'], $arguments['user']); + $absMountPoint = '/' . $arguments['user'] . '/files' . $newMountPoint; parent::__construct($storage, $absMountPoint, $arguments, $loader); } /** * check if the parent folder exists otherwise move the mount point up */ - private static function verifyMountPoint(&$share) { + private function verifyMountPoint(&$share, $user) { $mountPoint = basename($share['file_target']); $parent = dirname($share['file_target']); @@ -42,7 +42,7 @@ class SharedMount extends Mount implements MoveableMount { $newMountPoint = \OCA\Files_Sharing\Helper::generateUniqueTarget( \OC\Files\Filesystem::normalizePath($parent . '/' . $mountPoint), array(), - new \OC\Files\View('/' . \OCP\User::getUser() . '/files') + new \OC\Files\View('/' . $user . '/files') ); if($newMountPoint !== $share['file_target']) { |