diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2024-08-05 13:09:33 -0100 |
---|---|---|
committer | Maxence Lange <maxence@artificial-owl.com> | 2024-08-05 13:40:53 -0100 |
commit | 6c4b0dba7728b435446d199de595a39bf731c946 (patch) | |
tree | f2ea49d85757c1b763a35344446003ea0eaefa38 /apps | |
parent | 6dc614cb3115244a9d1a889c4e92252f157aef05 (diff) | |
download | nextcloud-server-6c4b0dba7728b435446d199de595a39bf731c946.tar.gz nextcloud-server-6c4b0dba7728b435446d199de595a39bf731c946.zip |
fix(inherited-shares): ignore top root folder
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index d71e07c0d4d..bc85da36d27 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -1078,8 +1078,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; } |