migrate: v2 basically working

This commit is contained in:
Purp1e
2024-09-20 10:14:36 +08:00
parent 7229e79cd4
commit b12c6279d5
18 changed files with 16950 additions and 1259 deletions

View File

@@ -24,16 +24,16 @@ pub fn get_steam_path<'a>() -> Result<String, &'a str> {
}
pub fn get_cs_path<'a>(name: &str) -> Result<String, &'a str> {
if name != "csgo" || name != "cs2" {
return Err("invalid cs name");
}
if name != "csgo" || name != "cs2" {
return Err("invalid cs name");
}
#[cfg(target_os = "windows")]
if let Ok(cs_path) = get_exe_path(&(name.to_owned() + ".exe")) {
return Ok(cs_path);
}
#[cfg(target_os = "windows")]
if let Ok(cs_path) = get_exe_path(&(name.to_owned() + ".exe")) {
return Ok(cs_path);
}
Err("no cs path found")
Err("no cs path found")
}
#[cfg(test)]