summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-08-15 11:53:54 +0200
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2022-10-25 10:48:30 +0000
commitdc0dcad920f4e6e4723db3894915be91f8b75b28 (patch)
tree2678459d8c2428640e632af497fa8ec6181d0b75 /lib/private
parentd48f13a3c63b97d4bcfa10322afd8fec92662dac (diff)
downloadnextcloud-server-dc0dcad920f4e6e4723db3894915be91f8b75b28.tar.gz
nextcloud-server-dc0dcad920f4e6e4723db3894915be91f8b75b28.zip
fix updating cached mounts that didn't have their mount provider set previously
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Config/UserMountCache.php7
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);
});
}