Skip to content

Commit 6d29826

Browse files
committed
fix: index mounts by mount point
Signed-off-by: Salvatore Martire <[email protected]>
1 parent 14d9abd commit 6d29826

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

apps/files_sharing/lib/External/MountProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ public function getMountsFromMountPoints(
123123
while ($row = $result->fetch()) {
124124
$row['manager'] = $this;
125125
$row['token'] = $row['share_token'];
126-
$mounts[] = $this->getMount($user, $row, $loader);
126+
$mount = $this->getMount($user, $row, $loader);
127+
$mounts[$mount->getMountPoint()] = $mount;
127128
}
128129
$result->closeCursor();
129130
return $mounts;

apps/files_sharing/lib/MountProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ public function getMountsFromSuperShares(
426426
$validShareCache->set($userId, $newMaxValidatedShare, 24 * 60 * 60);
427427

428428
// array_filter removes the null values from the array
429-
return array_values(array_filter($mounts));
429+
return array_filter($mounts);
430430
}
431431

432432
/**

0 commit comments

Comments
 (0)