We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 769af62 commit da6c293Copy full SHA for da6c293
src/blacklist.rs
@@ -56,9 +56,10 @@ pub fn get_current_profile(game_path: &String) -> anyhow::Result<String> {
56
57
if blacklist.exists() {
58
let data = fs::read_to_string(blacklist).unwrap();
59
+ let profile_name = data.lines().next().map(|line| line.replace("# Profile: ", "")).unwrap_or("Default".to_string());
60
let current_profile = profiles
61
.iter()
- .find(|v| v.name == data.lines().next().unwrap().replace("# Profile: ", ""));
62
+ .find(|v| v.name == profile_name);
63
64
if let Some(current_profile) = current_profile {
65
Ok(current_profile.name.clone())
0 commit comments