Skip to content

Commit

Permalink
Merge pull request #47067 from nextcloud/backport/47043/stable28
Browse files Browse the repository at this point in the history
[stable28] fix(inherited-shares): ignore top root folder
  • Loading branch information
AndyScherzinger authored Aug 7, 2024
2 parents 8e5956e + 518dcca commit d611843
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 @@ -1103,8 +1103,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 d611843

Please sign in to comment.