Skip to content

Commit

Permalink
Merge pull request #47043 from nextcloud/fix/noid/ignore-root-on-inhe…
Browse files Browse the repository at this point in the history
…rited-shares

fix(inherited-shares): ignore top root folder
  • Loading branch information
ArtificialOwl authored Aug 6, 2024
2 parents 5c54a3c + 6c4b0db commit b6e3009
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/files_sharing/lib/Controller/ShareAPIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1078,8 +1078,11 @@ public function getInheritedShares(string $path): DataResponse {
// generate node list for each parent folders
/** @var Node[] $nodes */
$nodes = [];
while ($node->getPath() !== $basePath) {
while (true) {
$node = $node->getParent();
if ($node->getPath() === $basePath) {
break;
}
$nodes[] = $node;
}

Expand Down

0 comments on commit b6e3009

Please sign in to comment.