migrate: v2 basically working
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user