diff options
author | Robin Appelman <robin@icewind.nl> | 2022-03-14 15:08:24 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-03-24 17:03:13 +0100 |
commit | d342c764f2f45ec6bcd026482fc4c8f2242cb132 (patch) | |
tree | d2b5b74df22cd27c4e4421c249d9213890431ec1 /lib/private/Files/SetupManager.php | |
parent | 6b085b6fd162aa288da17a27a553da34e1391412 (diff) | |
download | nextcloud-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.php | 8 |
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); } |