Skip to content

Commit 12415f4

Browse files
author
yggverse
committed
fix order by filename DESC
1 parent 293e1e7 commit 12415f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ fn crawl(argument: &Argument, output: &Output) -> Result<(), Box<dyn Error>> {
106106

107107
// scan dir files, sort by name desc
108108
let mut files: Vec<_> = read_dir(&path)?.filter_map(Result::ok).collect();
109-
files.sort_by_key(|f| f.file_name());
109+
files.sort_by_key(|f| std::cmp::Reverse(f.file_name()));
110110

111111
let mut data = Vec::with_capacity(argument.limit.unwrap_or_default());
112112
let mut index = File::create(&index_filename)?;

0 commit comments

Comments
 (0)