Skip to content

Commit 0d08308

Browse files
committed
fix: don't do full setup in setupForProvider if all requested providers are authoritative
Signed-off-by: Robin Appelman <[email protected]>
1 parent d9d1d04 commit 0d08308

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

lib/private/Files/SetupManager.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ static function (ICachedMountInfo $info) use ($rootsMetadata) {
643643
}
644644

645645
private function fullSetupRequired(IUser $user): bool {
646+
return true;
646647
if ($this->forceFullSetup) {
647648
return true;
648649
}
@@ -671,7 +672,18 @@ public function setupForProvider(string $path, array $providers): void {
671672
return;
672673
}
673674

674-
if ($this->fullSetupRequired($user)) {
675+
$providersAreAuthoritative = true;
676+
foreach ($providers as $provider) {
677+
if(!(
678+
is_a($provider, IAuthoritativeMountProvider::class, true)
679+
|| is_a($provider, IRootMountProvider::class, true)
680+
|| is_a($provider, IHomeMountProvider::class, true)
681+
)) {
682+
$providersAreAuthoritative = false;
683+
}
684+
}
685+
686+
if (!$providersAreAuthoritative && $this->fullSetupRequired($user)) {
675687
$this->setupForUser($user);
676688
return;
677689
}

0 commit comments

Comments
 (0)