diff --git a/lib/OC.php b/lib/OC.php index c24b6551853e8..0fb8956ff379c 100644 --- a/lib/OC.php +++ b/lib/OC.php @@ -19,7 +19,6 @@ use OCP\App\Events\AppsLoadedEvent; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\Events\BeforeFileSystemSetupEvent; -use OCP\Files\ISetupManager; use OCP\Group\Events\GroupDeletedEvent; use OCP\Group\Events\UserRemovedEvent; use OCP\IAppConfig; @@ -1030,8 +1029,6 @@ public static function registerCleanupHooks(\OC\SystemConfig $systemConfig): voi $request = Server::get(IRequest::class); $throttler = Server::get(IThrottler::class); $throttler->resetDelay($request->getRemoteAddress(), 'login', ['user' => $uid]); - - Server::get(ISetupManager::class)->setupForUser($user); } }); } diff --git a/lib/private/Files/SetupManager.php b/lib/private/Files/SetupManager.php index c25b8883fc770..a77b791c4671b 100644 --- a/lib/private/Files/SetupManager.php +++ b/lib/private/Files/SetupManager.php @@ -508,6 +508,8 @@ public function setupForPath(string $path, bool $includeChildren = false): void $setupProviders = &$this->setupUserMountProviders[$user->getUID()]; $currentProviders = []; + $this->oneTimeUserSetup($user); + try { $cachedMount = $this->userMountCache->getMountForPath($user, $path); } catch (NotFoundException $e) { @@ -515,8 +517,6 @@ public function setupForPath(string $path, bool $includeChildren = false): void return; } - $this->oneTimeUserSetup($user); - $this->eventLogger->start('fs:setup:user:path', "Setup $path filesystem for user"); $this->eventLogger->start('fs:setup:user:path:find', "Find mountpoint for $path");