Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: ensure array returned from getMountsForFileId is continious
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Aug 2, 2024
commit eb4fb994cf9162cb45a7909d5d5fa95b3b362afc
4 changes: 2 additions & 2 deletions lib/private/Files/Config/UserMountCache.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,9 +362,9 @@ public function getMountsForFileId($fileId, $user = null) {
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(
Expand Down