fix(inherited-shares): ignore top root folder

Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
Maxence Lange 2024-08-05 13:09:33 -01:00 committed by Andy Scherzinger
parent bbe667a7e5
commit 7930ca1468

View file

@ -1085,8 +1085,11 @@ class ShareAPIController extends OCSController {
// 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;
}