fix(list):尝试修复磁盘列表。
This commit is contained in:
		| @@ -96,6 +96,7 @@ pub async fn show_drives<R: Runtime>( | |||||||
|                 .iter() |                 .iter() | ||||||
|                 .filter(|m| !m.path.starts_with("/System") && !m.path.starts_with("/dev")); |                 .filter(|m| !m.path.starts_with("/System") && !m.path.starts_with("/dev")); | ||||||
|             for mount in mounts { |             for mount in mounts { | ||||||
|  |                 #[cfg(any(target_os = "macos", target_os = "linux"))] | ||||||
|                 let dirname = mount |                 let dirname = mount | ||||||
|                     .path |                     .path | ||||||
|                     .as_path() |                     .as_path() | ||||||
| @@ -104,6 +105,8 @@ pub async fn show_drives<R: Runtime>( | |||||||
|                     .to_os_string() |                     .to_os_string() | ||||||
|                     .into_string() |                     .into_string() | ||||||
|                     .unwrap(); |                     .unwrap(); | ||||||
|  |                 #[cfg(target_os = "windows")] | ||||||
|  |                 let dirname = mount.name.clone().unwrap_or_default(); | ||||||
|                 let dirname = if dirname.len() == 0 { |                 let dirname = if dirname.len() == 0 { | ||||||
|                     String::from("/") |                     String::from("/") | ||||||
|                 } else { |                 } else { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user