Skip to content

Commit 1fc7dcb

Browse files
committed
fixup!: Don't filter out not requested shares
Signed-off-by: Louis Chmn <[email protected]>
1 parent 44ce0f0 commit 1fc7dcb

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

apps/files_sharing/lib/External/MountProvider.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function getMountsForPath(
9595

9696
if (!$forChildren) {
9797
// override path with mount point when fetching without children
98-
$path = $mountProviderArgs[0]->mountInfo->getMountPoint(); // TODO: not sure what this is doing, is this getting the parent path?
98+
$path = $mountProviderArgs[0]->mountInfo->getMountPoint();
9999
}
100100

101101
// remove /uid/files as the target is stored without
@@ -127,14 +127,6 @@ public function getMountsForPath(
127127
$row['manager'] = $this;
128128
$row['token'] = $row['share_token'];
129129
$mount = $this->getMount($user, $row, $loader);
130-
131-
$isRequestedMount = array_any($mountProviderArgs, function (IMountProviderArgs $arg) use ($mount) {
132-
return $arg->mountInfo->getMountPoint() === $mount->getMountPoint();
133-
});
134-
if (!$isRequestedMount) {
135-
continue; // TODO: does it means something is off? because we have it in oc_share_external but not in oc_mounts
136-
}
137-
138130
$mounts[$mount->getMountPoint()] = $mount;
139131
}
140132
$result->closeCursor();

apps/files_sharing/lib/MountProvider.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -406,16 +406,6 @@ public function getMountsForPath(
406406
$shares = $this->filterShares($shares, $userId);
407407
$superShares = $this->buildSuperShares($shares, $user);
408408

409-
// remove unrequested shares
410-
$superShares = \array_filter($superShares, function (array $shares) use ($mountProviderArgs) {
411-
$superShare = $shares[0];
412-
413-
return array_any($mountProviderArgs,
414-
function (IMountProviderArgs $mountProviderArg) use ($superShare) {
415-
return $superShare->getNodeId() === $mountProviderArg->mountInfo->getRootId();
416-
});
417-
});
418-
419409
return $this->getMountsFromSuperShares($userId,
420410
$superShares,
421411
$loader,

0 commit comments

Comments
 (0)