diff options
author | Robin Appelman <robin@icewind.nl> | 2022-08-15 12:53:54 +0300 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2022-10-25 13:48:30 +0300 |
commit | dc0dcad920f4e6e4723db3894915be91f8b75b28 (patch) | |
tree | 2678459d8c2428640e632af497fa8ec6181d0b75 | |
parent | d48f13a3c63b97d4bcfa10322afd8fec92662dac (diff) |
fix updating cached mounts that didn't have their mount provider set previously
Signed-off-by: Robin Appelman <robin@icewind.nl>
-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); }); } |