Feat: Implementiert Funktion zur Ermittlung des ersten freien Laufwerksbuchstabens auf Windows.
This commit is contained in:
@@ -102,7 +102,14 @@ fn get_default_mount_path() -> String {
|
||||
}
|
||||
#[cfg(any(target_os = "windows"))]
|
||||
{
|
||||
"".to_string() //TODO Was kommt hier hin????
|
||||
let drives = ('C'..='Z').collect::<Vec<char>>();
|
||||
for drive in drives {
|
||||
let drive_string = format!("{}:", drive);
|
||||
if !std::path::Path::new(&drive_string).exists() {
|
||||
return format!("{}:", drive);
|
||||
}
|
||||
}
|
||||
"H".to_string()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user