From dd82326e3eaca98d1ae835e0ee70e94f4da37a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Skrzypczak?= Date: Tue, 4 Mar 2025 18:09:49 +0100 Subject: [PATCH 1/2] fix #552 Get folders list in hierarchical order --- src/Client.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Client.php b/src/Client.php index 19749a32..5eb26ff2 100755 --- a/src/Client.php +++ b/src/Client.php @@ -604,7 +604,7 @@ public function getFolders(bool $hierarchical = true, ?string $parent_folder = n $folder = new Folder($this, $folder_name, $item["delimiter"], $item["flags"]); if ($hierarchical && $folder->hasChildren()) { - $pattern = $folder->full_name.$folder->delimiter.'%'; + $pattern = $folder->path.$folder->delimiter.'%'; $children = $this->getFolders(true, $pattern, true); $folder->setChildren($children); @@ -650,7 +650,7 @@ public function getFoldersWithStatus(bool $hierarchical = true, ?string $parent_ $folder = new Folder($this, $folder_name, $item["delimiter"], $item["flags"]); if ($hierarchical && $folder->hasChildren()) { - $pattern = $folder->full_name.$folder->delimiter.'%'; + $pattern = $folder->path.$folder->delimiter.'%'; $children = $this->getFoldersWithStatus(true, $pattern, true); $folder->setChildren($children); From 2598b2b00c9f859aa87a8d41c75b3929b7157c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Skrzypczak?= Date: Tue, 4 Mar 2025 18:09:49 +0100 Subject: [PATCH 2/2] fix #560 Get folders list in hierarchical order --- src/Client.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Client.php b/src/Client.php index 19749a32..5eb26ff2 100755 --- a/src/Client.php +++ b/src/Client.php @@ -604,7 +604,7 @@ public function getFolders(bool $hierarchical = true, ?string $parent_folder = n $folder = new Folder($this, $folder_name, $item["delimiter"], $item["flags"]); if ($hierarchical && $folder->hasChildren()) { - $pattern = $folder->full_name.$folder->delimiter.'%'; + $pattern = $folder->path.$folder->delimiter.'%'; $children = $this->getFolders(true, $pattern, true); $folder->setChildren($children); @@ -650,7 +650,7 @@ public function getFoldersWithStatus(bool $hierarchical = true, ?string $parent_ $folder = new Folder($this, $folder_name, $item["delimiter"], $item["flags"]); if ($hierarchical && $folder->hasChildren()) { - $pattern = $folder->full_name.$folder->delimiter.'%'; + $pattern = $folder->path.$folder->delimiter.'%'; $children = $this->getFoldersWithStatus(true, $pattern, true); $folder->setChildren($children);