mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix updating cached mounts that didn't have their mount provider set previously
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
cb97e8f15c
commit
10767d7779
1 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue