Skip to content

Commit 22326fa

Browse files
committed
Sort sequences with natural ordering
1 parent 4b7008c commit 22326fa

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

splashsurf/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ rayon = "1.7"
2323
bytemuck = "1.9"
2424
regex = "1"
2525
walkdir = "2"
26+
lexical-sort = "0.3"

splashsurf/src/reconstruction.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,11 @@ mod arguments {
497497
for entry in WalkDir::new(input_root)
498498
.max_depth(1)
499499
.contents_first(true)
500-
.sort_by_file_name()
500+
.sort_by(|a, b| {
501+
let a = a.file_name().to_string_lossy();
502+
let b = b.file_name().to_string_lossy();
503+
lexical_sort::natural_cmp(&a, &b)
504+
})
501505
.into_iter()
502506
.filter_map(|e| e.ok())
503507
.filter(|e| e.file_type().is_file())

0 commit comments

Comments
 (0)