inject the correct external share manager into the storage

This commit is contained in:
Robin Appelman 2016-02-25 13:33:42 +01:00
parent 914ac09aae
commit f338329ddf
1 changed files with 4 additions and 3 deletions

View File

@ -49,12 +49,13 @@ class MountProvider implements IMountProvider {
} }
public function getMount(IUser $user, $data, IStorageFactory $storageFactory) { public function getMount(IUser $user, $data, IStorageFactory $storageFactory) {
$data['manager'] = $this; $managerProvider = $this->managerProvider;
$manager = $managerProvider();
$data['manager'] = $manager;
$mountPoint = '/' . $user->getUID() . '/files/' . ltrim($data['mountpoint'], '/'); $mountPoint = '/' . $user->getUID() . '/files/' . ltrim($data['mountpoint'], '/');
$data['mountpoint'] = $mountPoint; $data['mountpoint'] = $mountPoint;
$data['certificateManager'] = \OC::$server->getCertificateManager($user->getUID()); $data['certificateManager'] = \OC::$server->getCertificateManager($user->getUID());
$managerProvider = $this->managerProvider; return new Mount(self::STORAGE, $mountPoint, $data, $manager, $storageFactory);
return new Mount(self::STORAGE, $mountPoint, $data, $managerProvider(), $storageFactory);
} }
public function getMountsForUser(IUser $user, IStorageFactory $loader) { public function getMountsForUser(IUser $user, IStorageFactory $loader) {