Skip to content

Commit

Permalink
Merge pull request #597 from anthraxx/fix/reproducible-posts-order
Browse files Browse the repository at this point in the history
fix(files): sort by filename to have a reproducibly walking iterator
  • Loading branch information
epage authored Jan 31, 2019
2 parents 4d8bf4d + 1aa7510 commit 1e48e64
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cobalt_model/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ impl<'a> FilesIterator<'a> {
let walker = WalkDir::new(files.root_dir.as_path())
.min_depth(1)
.follow_links(false)
.sort_by(|a, b| a.file_name().cmp(b.file_name()))
.into_iter()
.filter_entry(move |e| files.includes_entry(e))
.filter_map(|e| e.ok())
Expand Down

0 comments on commit 1e48e64

Please sign in to comment.