From c42fbed3d2aa62b73d0c6ff4556795fde5d607e1 Mon Sep 17 00:00:00 2001 From: "shiro.lee" <69624924+shiroleeee@users.noreply.github.com> Date: Thu, 7 Aug 2025 11:05:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Fixed=20an=20issue=20where=20the=20list?= =?UTF-8?q?=5Fobjects=5Fv2=20API=20did=20not=20return=20dire=E2=80=A6=20(#?= =?UTF-8?q?352)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Fixed an issue where the list_objects_v2 API did not return directory names when they conflicted with file names in the same bucket (e.g., test/ vs. test.txt, aaa/ vs. aaa.csv) (#335) * fix: adjusted the order of directory listings --- crates/ecstore/src/disk/local.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ecstore/src/disk/local.rs b/crates/ecstore/src/disk/local.rs index 54106232..8da37796 100644 --- a/crates/ecstore/src/disk/local.rs +++ b/crates/ecstore/src/disk/local.rs @@ -953,9 +953,8 @@ impl LocalDisk { let name = path_join_buf(&[current, entry]); if !dir_stack.is_empty() { - if let Some(pop) = dir_stack.pop() { + if let Some(pop) = dir_stack.last().cloned() { if pop < name { - // out.write_obj(&MetaCacheEntry { name: pop.clone(), ..Default::default() @@ -969,6 +968,7 @@ impl LocalDisk { error!("scan_dir err {:?}", er); } } + dir_stack.pop(); } } }