Skip to content

Commit 1e48e64

Browse files
authored
Merge pull request #597 from anthraxx/fix/reproducible-posts-order
fix(files): sort by filename to have a reproducibly walking iterator
2 parents 4d8bf4d + 1aa7510 commit 1e48e64

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cobalt_model/files.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ impl<'a> FilesIterator<'a> {
9191
let walker = WalkDir::new(files.root_dir.as_path())
9292
.min_depth(1)
9393
.follow_links(false)
94+
.sort_by(|a, b| a.file_name().cmp(b.file_name()))
9495
.into_iter()
9596
.filter_entry(move |e| files.includes_entry(e))
9697
.filter_map(|e| e.ok())

0 commit comments

Comments
 (0)