Fix ~ improve portability of path manipulation

This commit is contained in:
Roy Ivy III
2020-01-21 21:18:36 -06:00
parent 18510130d8
commit 7c34389aea
2 changed files with 24 additions and 12 deletions
+4 -1
View File
@@ -159,7 +159,10 @@ pub fn format_string(
) -> String {
let printable_name = {
if display_data.short_paths {
dir_name.split('/').last().unwrap_or(dir_name)
dir_name
.split(std::path::is_separator)
.last()
.unwrap_or(dir_name)
} else {
dir_name
}