aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/SetupManager.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-03-14 15:08:24 +0100
committerRobin Appelman <robin@icewind.nl>2022-03-24 17:03:13 +0100
commitd342c764f2f45ec6bcd026482fc4c8f2242cb132 (patch)
treed2b5b74df22cd27c4e4421c249d9213890431ec1 /lib/private/Files/SetupManager.php
parent6b085b6fd162aa288da17a27a553da34e1391412 (diff)
downloadnextcloud-server-d342c764f2f45ec6bcd026482fc4c8f2242cb132.tar.gz
nextcloud-server-d342c764f2f45ec6bcd026482fc4c8f2242cb132.zip
don't double setup provider when calling `setupForUser` after `setupForPath`
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/SetupManager.php')
-rw-r--r--lib/private/Files/SetupManager.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/Files/SetupManager.php b/lib/private/Files/SetupManager.php
index 7e091da0e01..e83b7448414 100644
--- a/lib/private/Files/SetupManager.php
+++ b/lib/private/Files/SetupManager.php
@@ -204,8 +204,14 @@ class SetupManager {
}
$this->setupUsersComplete[] = $user->getUID();
+ if (!isset($this->setupUserMountProviders[$user->getUID()])) {
+ $this->setupUserMountProviders[$user->getUID()] = [];
+ }
+
$this->setupForUserWith($user, function () use ($user) {
- $this->mountProviderCollection->addMountForUser($user, $this->mountManager);
+ $this->mountProviderCollection->addMountForUser($user, $this->mountManager, function (IMountProvider $provider) use ($user) {
+ return !in_array(get_class($provider), $this->setupUserMountProviders[$user->getUID()]);
+ });
});
$this->userFullySetup($user);
}