create new mounts every time the mount provider is called
important for storage wrappers
This commit is contained in:
parent
5247a0685d
commit
e3e78f809d
|
@ -32,7 +32,7 @@ trait MountProviderTrait {
|
|||
if (!isset($this->mounts[$userId])) {
|
||||
$this->mounts[$userId] = [];
|
||||
}
|
||||
$this->mounts[$userId][] = new MountPoint($storage, $mountPoint, $arguments, $this->storageFactory);
|
||||
$this->mounts[$userId][] = ['storage' => $storage, 'mountPoint' => $mountPoint, 'arguments' => $arguments];
|
||||
}
|
||||
|
||||
protected function registerStorageWrapper($name, $wrapper) {
|
||||
|
@ -46,7 +46,9 @@ trait MountProviderTrait {
|
|||
->method('getMountsForUser')
|
||||
->will($this->returnCallback(function (IUser $user) {
|
||||
if (isset($this->mounts[$user->getUID()])) {
|
||||
return $this->mounts[$user->getUID()];
|
||||
return array_map(function ($config) {
|
||||
return new MountPoint($config['storage'], $config['mountPoint'], $config['arguments'], $this->storageFactory);
|
||||
}, $this->mounts[$user->getUID()]);
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue