Sort the files in descending order

This commit is contained in:
Blaž Hrastnik 2021-06-28 13:08:38 +09:00
parent 82fc28a0ce
commit d94410a678

View File

@ -106,7 +106,7 @@ pub fn file_picker(root: PathBuf) -> Picker<PathBuf> {
files.take(MAX).collect()
};
files.sort_by_key(|file| file.1);
files.sort_by_key(|file| std::cmp::Reverse(file.1));
let files = files.into_iter().map(|(path, _)| path).collect();