diff options
Diffstat (limited to 'apps/files_external/lib/config/configadapter.php')
-rw-r--r-- | apps/files_external/lib/config/configadapter.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/files_external/lib/config/configadapter.php b/apps/files_external/lib/config/configadapter.php index f9640d53377..4e37e6a4004 100644 --- a/apps/files_external/lib/config/configadapter.php +++ b/apps/files_external/lib/config/configadapter.php @@ -23,6 +23,7 @@ namespace OCA\Files_External\Config; +use OCA\Files_external\Migration\StorageMigrator; use OCP\Files\Storage; use OC\Files\Mount\MountPoint; use OCP\Files\Storage\IStorageFactory; @@ -44,17 +45,22 @@ class ConfigAdapter implements IMountProvider { /** @var UserGlobalStoragesService */ private $userGlobalStoragesService; + /** @var StorageMigrator */ + private $migrator; /** * @param UserStoragesService $userStoragesService * @param UserGlobalStoragesService $userGlobalStoragesService + * @param StorageMigrator $migrator */ public function __construct( UserStoragesService $userStoragesService, - UserGlobalStoragesService $userGlobalStoragesService + UserGlobalStoragesService $userGlobalStoragesService, + StorageMigrator $migrator ) { $this->userStoragesService = $userStoragesService; $this->userGlobalStoragesService = $userGlobalStoragesService; + $this->migrator = $migrator; } /** @@ -108,6 +114,8 @@ class ConfigAdapter implements IMountProvider { * @return \OCP\Files\Mount\IMountPoint[] */ public function getMountsForUser(IUser $user, IStorageFactory $loader) { + $this->migrator->migrateUser(); + $mounts = []; $this->userStoragesService->setUser($user); @@ -124,7 +132,7 @@ class ConfigAdapter implements IMountProvider { $mount = new MountPoint( $impl, - '/'.$user->getUID().'/files' . $storage->getMountPoint(), + '/' . $user->getUID() . '/files' . $storage->getMountPoint(), null, $loader, $storage->getMountOptions() @@ -145,7 +153,7 @@ class ConfigAdapter implements IMountProvider { $this->userStoragesService, $storage->getId(), $impl, - '/'.$user->getUID().'/files' . $storage->getMountPoint(), + '/' . $user->getUID() . '/files' . $storage->getMountPoint(), null, $loader, $storage->getMountOptions() |