Skip to content

Commit

Permalink
fix(inherited-shares): ignore top root folder
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <[email protected]>
  • Loading branch information
ArtificialOwl authored and AndyScherzinger committed Aug 7, 2024
1 parent bbe667a commit 7930ca1
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 @@ -1085,8 +1085,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 7930ca1

Please sign in to comment.