Skip to content

Commit b6e3009

Browse files
Merge pull request #47043 from nextcloud/fix/noid/ignore-root-on-inherited-shares
fix(inherited-shares): ignore top root folder
2 parents 5c54a3c + 6c4b0db commit b6e3009

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

apps/files_sharing/lib/Controller/ShareAPIController.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,8 +1078,11 @@ public function getInheritedShares(string $path): DataResponse {
10781078
// generate node list for each parent folders
10791079
/** @var Node[] $nodes */
10801080
$nodes = [];
1081-
while ($node->getPath() !== $basePath) {
1081+
while (true) {
10821082
$node = $node->getParent();
1083+
if ($node->getPath() === $basePath) {
1084+
break;
1085+
}
10831086
$nodes[] = $node;
10841087
}
10851088

0 commit comments

Comments
 (0)