Browse Source

fix updating cached mounts that didn't have their mount provider set previously

Signed-off-by: Robin Appelman <robin@icewind.nl>
tags/v25.0.0beta2
Robin Appelman 1 year ago
parent
commit
10767d7779
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      lib/private/Files/Config/UserMountCache.php

+ 6
- 1
lib/private/Files/Config/UserMountCache.php View File

@@ -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…
Cancel
Save