mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
Fix ~ improve portability of path manipulation
This commit is contained in:
+4
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user