Skip to content

Commit 800a482

Browse files
committed
fix(source): Make duplicate selection predictable
1 parent b8ff6af commit 800a482

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cargo/sources/path.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,8 @@ fn walk(path: &Path, callback: &mut dyn FnMut(&Path) -> CargoResult<bool>) -> Ca
882882
return Err(e.context(cx));
883883
}
884884
};
885+
let mut dirs = dirs.collect::<Vec<_>>();
886+
dirs.sort_unstable_by_key(|d| d.as_ref().ok().map(|d| d.file_name()));
885887
for dir in dirs {
886888
let dir = dir?;
887889
if dir.file_type()?.is_dir() {

0 commit comments

Comments
 (0)