diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-01-13 15:29:53 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-01-20 16:32:56 +0100 |
commit | 483c6b68e2797a4608f5ff519ba961facdf8e9e4 (patch) | |
tree | d804635a0969b2431dfe4b1418bc8412ebab7880 /apps/files_external/migration | |
parent | bc7bd0cd0532b8309d317c23ee4f13106e0a0e1d (diff) | |
download | nextcloud-server-483c6b68e2797a4608f5ff519ba961facdf8e9e4.tar.gz nextcloud-server-483c6b68e2797a4608f5ff519ba961facdf8e9e4.zip |
clear mount cache when removing applicables
Diffstat (limited to 'apps/files_external/migration')
-rw-r--r-- | apps/files_external/migration/storagemigrator.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/apps/files_external/migration/storagemigrator.php b/apps/files_external/migration/storagemigrator.php index 2da47decf9f..ba81810a4fd 100644 --- a/apps/files_external/migration/storagemigrator.php +++ b/apps/files_external/migration/storagemigrator.php @@ -29,6 +29,7 @@ use OCA\Files_external\Service\LegacyStoragesService; use OCA\Files_external\Service\StoragesService; use OCA\Files_external\Service\UserLegacyStoragesService; use OCA\Files_external\Service\UserStoragesService; +use OCP\Files\Config\IUserMountCache; use OCP\IConfig; use OCP\IDBConnection; use OCP\ILogger; @@ -64,6 +65,9 @@ class StorageMigrator { */ private $logger; + /** @var IUserMountCache */ + private $userMountCache; + /** * StorageMigrator constructor. * @@ -72,19 +76,22 @@ class StorageMigrator { * @param IConfig $config * @param IDBConnection $connection * @param ILogger $logger + * @param IUserMountCache $userMountCache */ public function __construct( BackendService $backendService, DBConfigService $dbConfig, IConfig $config, IDBConnection $connection, - ILogger $logger + ILogger $logger, + IUserMountCache $userMountCache ) { $this->backendService = $backendService; $this->dbConfig = $dbConfig; $this->config = $config; $this->connection = $connection; $this->logger = $logger; + $this->userMountCache = $userMountCache; } private function migrate(LegacyStoragesService $legacyService, StoragesService $storageService) { @@ -107,7 +114,7 @@ class StorageMigrator { */ public function migrateGlobal() { $legacyService = new GlobalLegacyStoragesService($this->backendService); - $storageService = new GlobalStoragesService($this->backendService, $this->dbConfig); + $storageService = new GlobalStoragesService($this->backendService, $this->dbConfig, $this->userMountCache); $this->migrate($legacyService, $storageService); } @@ -125,7 +132,7 @@ class StorageMigrator { if (version_compare($userVersion, '0.5.0', '<')) { $this->config->setUserValue($userId, 'files_external', 'config_version', '0.5.0'); $legacyService = new UserLegacyStoragesService($this->backendService, $dummySession); - $storageService = new UserStoragesService($this->backendService, $this->dbConfig, $dummySession); + $storageService = new UserStoragesService($this->backendService, $this->dbConfig, $dummySession, $this->userMountCache); $this->migrate($legacyService, $storageService); } |