diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-10-27 13:36:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-27 13:36:33 +0200 |
commit | 1524b5fd2542d175b347bea0244728c4169b2fb8 (patch) | |
tree | cd9ad297db3bcb0b660494c0adcade3ea59f6256 /lib | |
parent | aad2525cf512adbd8fc1c95c12e2823e4cae606e (diff) | |
parent | 82b915e7bbc6faf796b344c5afc84146a574f06e (diff) | |
download | nextcloud-server-1524b5fd2542d175b347bea0244728c4169b2fb8.tar.gz nextcloud-server-1524b5fd2542d175b347bea0244728c4169b2fb8.zip |
Merge pull request #34797 from nextcloud/backport/33540/stable24
[stable24] fix updating cached mounts that didn't have their mount provider set previously
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Config/UserMountCache.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php index 666ba9b065b..84e87c48bc7 100644 --- a/lib/private/Files/Config/UserMountCache.php +++ b/lib/private/Files/Config/UserMountCache.php @@ -104,7 +104,12 @@ class UserMountCache implements IUserMountCache { $cachedMounts = $this->getMountsForUser($user); if (is_array($mountProviderClasses)) { - $cachedMounts = array_filter($cachedMounts, function (ICachedMountInfo $mountInfo) use ($mountProviderClasses) { + $cachedMounts = array_filter($cachedMounts, function (ICachedMountInfo $mountInfo) use ($mountProviderClasses, $newMounts) { + // for existing mounts that didn't have a mount provider set + // we still want the ones that map to new mounts + if ($mountInfo->getMountProvider() === '' && isset($newMounts[$mountInfo->getRootId()])) { + return true; + } return in_array($mountInfo->getMountProvider(), $mountProviderClasses); }); } |