From 3cc5502ac80a0319bd09eff6b5f34fa6646b0667 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 29 Nov 2023 16:34:19 +0100 Subject: [PATCH] add a debug option to force a full filesystem setup Signed-off-by: Robin Appelman --- lib/private/Files/SetupManager.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/private/Files/SetupManager.php b/lib/private/Files/SetupManager.php index 511e80bd7d90e..93b7dc37b6b92 100644 --- a/lib/private/Files/SetupManager.php +++ b/lib/private/Files/SetupManager.php @@ -80,6 +80,7 @@ class SetupManager { private bool $listeningForProviders; private array $fullSetupRequired = []; private bool $setupBuiltinWrappersDone = false; + private bool $forceFullSetup = false; public function __construct( private IEventLogger $eventLogger, @@ -97,6 +98,7 @@ public function __construct( ) { $this->cache = $cacheFactory->createDistributed('setupmanager::'); $this->listeningForProviders = false; + $this->forceFullSetup = $this->config->getSystemValueBool('debug.force-full-fs-setup'); $this->setupListeners(); } @@ -470,6 +472,10 @@ public function setupForPath(string $path, bool $includeChildren = false): void } private function fullSetupRequired(IUser $user): bool { + if ($this->forceFullSetup) { + return true; + } + // we perform a "cached" setup only after having done the full setup recently // this is also used to trigger a full setup after handling events that are likely // to change the available mounts