Skip to content

Commit c42fbed

Browse files
authored
fix: Fixed an issue where the list_objects_v2 API did not return dire… (#352)
* 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
1 parent fd539f0 commit c42fbed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/ecstore/src/disk/local.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,9 +953,8 @@ impl LocalDisk {
953953
let name = path_join_buf(&[current, entry]);
954954

955955
if !dir_stack.is_empty() {
956-
if let Some(pop) = dir_stack.pop() {
956+
if let Some(pop) = dir_stack.last().cloned() {
957957
if pop < name {
958-
//
959958
out.write_obj(&MetaCacheEntry {
960959
name: pop.clone(),
961960
..Default::default()
@@ -969,6 +968,7 @@ impl LocalDisk {
969968
error!("scan_dir err {:?}", er);
970969
}
971970
}
971+
dir_stack.pop();
972972
}
973973
}
974974
}

0 commit comments

Comments
 (0)