aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Config/UserMountCache.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2024-07-30 16:32:36 +0200
committerRobin Appelman <robin@icewind.nl>2024-08-02 17:22:33 +0200
commiteb4fb994cf9162cb45a7909d5d5fa95b3b362afc (patch)
tree637e0a0fdf63bd541543587aaa06910079dc0a6d /lib/private/Files/Config/UserMountCache.php
parent08ec209aeec679d1f315fa4fe47617c71788d274 (diff)
downloadnextcloud-server-eb4fb994cf9162cb45a7909d5d5fa95b3b362afc.tar.gz
nextcloud-server-eb4fb994cf9162cb45a7909d5d5fa95b3b362afc.zip
fix: ensure array returned from getMountsForFileId is continious
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/Config/UserMountCache.php')
-rw-r--r--lib/private/Files/Config/UserMountCache.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php
index 66aa3a6607b..67b2cad7ea2 100644
--- a/lib/private/Files/Config/UserMountCache.php
+++ b/lib/private/Files/Config/UserMountCache.php
@@ -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(