Skip to content

Commit

Permalink
Merge pull request #47068 from nextcloud/backport/47043/stable29
Browse files Browse the repository at this point in the history
[stable29] fix(inherited-shares): ignore top root folder
  • Loading branch information
AndyScherzinger authored Aug 6, 2024
2 parents 8735375 + 4370f9f commit d629e65
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 @@ -1101,8 +1101,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 d629e65

Please sign in to comment.