fix(list):修复Windows中盘符显示。

This commit is contained in:
徐涛 2023-03-21 17:24:53 +08:00
parent 45844453b4
commit d7aeb00212

View File

@ -106,7 +106,7 @@ pub async fn show_drives<R: Runtime>(
.into_string() .into_string()
.unwrap(); .unwrap();
#[cfg(target_os = "windows")] #[cfg(target_os = "windows")]
let dirname = mount.path.clone().unwrap_or_default().display(); let dirname = mount.path.display().to_string();
let dirname = if dirname.len() == 0 { let dirname = if dirname.len() == 0 {
String::from("/") String::from("/")
} else { } else {