From e8cd5718203bbe91f499b70d117e9b982964fbb7 Mon Sep 17 00:00:00 2001 From: Irevoire Date: Wed, 26 Oct 2022 14:24:39 +0200 Subject: [PATCH] try to convert the OsStr to a rust string to fix the sort --- dump/src/writer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dump/src/writer.rs b/dump/src/writer.rs index 639463bab..789930bd1 100644 --- a/dump/src/writer.rs +++ b/dump/src/writer.rs @@ -219,13 +219,13 @@ pub(crate) mod test { let (aft, bft) = (a.file_type().unwrap(), b.file_type().unwrap()); if aft.is_dir() && bft.is_dir() { - a.file_name().cmp(&b.file_name()) + a.file_name().into_string().unwrap().cmp(&b.file_name().into_string().unwrap()) } else if aft.is_file() { std::cmp::Ordering::Greater } else if bft.is_file() { std::cmp::Ordering::Less } else { - a.file_name().cmp(&b.file_name()) + a.file_name().into_string().unwrap().cmp(&b.file_name().into_string().unwrap()) } });