Skip to content

Commit fe0d6d1

Browse files
committed
perf(files_sharing): Remove dead code in MountProvider causing all mounts to be loaded
Signed-off-by: provokateurin <kate@provokateurin.de>
1 parent e10805f commit fe0d6d1

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

apps/files_sharing/lib/MountProvider.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,9 @@ public function getMountsFromSuperShares(
264264
IStorageFactory $loader,
265265
): array {
266266
$userId = $user->getUID();
267-
$allMounts = $this->mountManager->getAll();
268267
$mounts = [];
269-
$view = new View('/' . $userId . '/files');
270268
$ownerViews = [];
271269
$sharingDisabledForUser = $this->shareManager->sharingDisabledForUser($userId);
272-
/** @var CappedMemoryCache<bool> $folderExistCache */
273-
$foldersExistCache = new CappedMemoryCache();
274270

275271
$validShareCache = $this->cacheFactory->createLocal('share-valid-mountpoint-max');
276272
$maxValidatedShare = $validShareCache->get($userId) ?? 0;
@@ -313,10 +309,9 @@ public function getMountsFromSuperShares(
313309
$event = new ShareMountedEvent($mount);
314310
$this->eventDispatcher->dispatchTyped($event);
315311

316-
$mounts[$mount->getMountPoint()] = $allMounts[$mount->getMountPoint()] = $mount;
312+
$mounts[$mount->getMountPoint()] = $mount;
317313
foreach ($event->getAdditionalMounts() as $additionalMount) {
318314
$mounts[$additionalMount->getMountPoint()] = $additionalMount;
319-
$allMounts[$additionalMount->getMountPoint()] = $additionalMount;
320315
}
321316
} catch (Exception $e) {
322317
$this->logger->error(

0 commit comments

Comments
 (0)