From dc0dcad920f4e6e4723db3894915be91f8b75b28 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 15 Aug 2022 11:53:54 +0200 Subject: fix updating cached mounts that didn't have their mount provider set previously Signed-off-by: Robin Appelman --- lib/private/Files/Config/UserMountCache.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/private') 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); }); } -- cgit v1.2.3