diff options
author | Maxence Lange <maxence@artificial-owl.com> | 2024-08-05 13:09:33 -0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-08-06 12:11:46 +0000 |
commit | 518dccaa14800ea53eef1181cf5e6a4f6d7323b5 (patch) | |
tree | fed8a74609457682e67070cdb16207d465913ceb | |
parent | 6d44811cffa727d4ff1ffe030f0e9951ea212c71 (diff) | |
download | nextcloud-server-518dccaa14800ea53eef1181cf5e6a4f6d7323b5.tar.gz nextcloud-server-518dccaa14800ea53eef1181cf5e6a4f6d7323b5.zip |
fix(inherited-shares): ignore top root folder
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
-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 bd95c412833..c7b9235bb27 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -1103,8 +1103,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; } |