diff options
author | Andy Scherzinger <info@andy-scherzinger.de> | 2024-08-06 20:15:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-06 20:15:49 +0200 |
commit | d629e65ee4c931cf127b4a54f0c0b2ac53a3f575 (patch) | |
tree | 9b12d1b4a5b5519d144597bdb6be33e0ad3b152b /apps | |
parent | 873537577e5bab6fc2787f823115d97644b43222 (diff) | |
parent | 4370f9f4e9193aa2a7b74a2ffe478ad814fe83a1 (diff) | |
download | nextcloud-server-d629e65ee4c931cf127b4a54f0c0b2ac53a3f575.tar.gz nextcloud-server-d629e65ee4c931cf127b4a54f0c0b2ac53a3f575.zip |
Merge pull request #47068 from nextcloud/backport/47043/stable29
[stable29] fix(inherited-shares): ignore top root folder
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 dce09612fbd..52ef2835451 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -1101,8 +1101,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; } |