From 91eabf46b85debe0a2b3518568c3ce4424441c03 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Wed, 23 Sep 2026 09:04:27 +0200 Subject: [PATCH 1/2] fix(SetupManager): Run one-time user setup before getting cached mount Signed-off-by: provokateurin --- lib/private/Files/SetupManager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"); From d982af63838111bb695bceda5ca024ddf2b29a33 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Wed, 23 Sep 2026 09:06:10 +0200 Subject: [PATCH 2/2] perf(OC): Stop setting up the filesystem for every new session Signed-off-by: provokateurin --- lib/OC.php | 3 --- 1 file changed, 3 deletions(-) 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); } }); }