diff options
author | Robin Appelman <robin@icewind.nl> | 2022-08-15 11:53:54 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-08-16 13:47:41 +0200 |
commit | 10767d77799e2b530ac3220b2cf79719dcf8cce9 (patch) | |
tree | b417813ac577eccc78cc6de3867c455199ccd404 /lib | |
parent | cb97e8f15c75cc46e345ebfc79dcad1b9c48bd01 (diff) | |
download | nextcloud-server-10767d77799e2b530ac3220b2cf79719dcf8cce9.tar.gz nextcloud-server-10767d77799e2b530ac3220b2cf79719dcf8cce9.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')
-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 685057a7860..3540b563742 100644 --- a/lib/private/Files/Config/UserMountCache.php +++ b/lib/private/Files/Config/UserMountCache.php @@ -90,7 +90,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); }); } |