mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 11:56:38 +00:00
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
This commit is contained in:
@@ -953,9 +953,8 @@ impl LocalDisk {
|
|||||||
let name = path_join_buf(&[current, entry]);
|
let name = path_join_buf(&[current, entry]);
|
||||||
|
|
||||||
if !dir_stack.is_empty() {
|
if !dir_stack.is_empty() {
|
||||||
if let Some(pop) = dir_stack.pop() {
|
if let Some(pop) = dir_stack.last().cloned() {
|
||||||
if pop < name {
|
if pop < name {
|
||||||
//
|
|
||||||
out.write_obj(&MetaCacheEntry {
|
out.write_obj(&MetaCacheEntry {
|
||||||
name: pop.clone(),
|
name: pop.clone(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
@@ -969,6 +968,7 @@ impl LocalDisk {
|
|||||||
error!("scan_dir err {:?}", er);
|
error!("scan_dir err {:?}", er);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
dir_stack.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user