fix: ensure array returned from getMountsForFileId is continious

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2024-07-30 16:32:36 +02:00
parent 08ec209aee
commit eb4fb994cf
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View file

@ -362,9 +362,9 @@ class UserMountCache implements IUserMountCache {
return $internalMountPath === '' || str_starts_with($internalPath, $internalMountPath . '/');
});
$filteredMounts = array_filter($filteredMounts, function (ICachedMountInfo $mount) {
$filteredMounts = array_values(array_filter($filteredMounts, function (ICachedMountInfo $mount) {
return $this->userManager->userExists($mount->getUser()->getUID());
});
}));
return array_map(function (ICachedMountInfo $mount) use ($internalPath) {
return new CachedMountFileInfo(