diff options
author | Andy Scherzinger <info@andy-scherzinger.de> | 2024-08-07 20:49:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-07 20:49:09 +0200 |
commit | d611843651522fcd0d9c424171f516172e6b094f (patch) | |
tree | de6200a32b4d3c33af407d4217ae8e5f5f745c6f | |
parent | 8e5956ea6afa96be39c091e42b6a740958f1d678 (diff) | |
parent | 518dccaa14800ea53eef1181cf5e6a4f6d7323b5 (diff) | |
download | nextcloud-server-d611843651522fcd0d9c424171f516172e6b094f.tar.gz nextcloud-server-d611843651522fcd0d9c424171f516172e6b094f.zip |
Merge pull request #47067 from nextcloud/backport/47043/stable28
[stable28] fix(inherited-shares): ignore top root folder
-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; } |