fix: user config retrival on linux

This commit is contained in:
2026-06-03 20:51:14 +02:00
parent 554f07412b
commit 344f15b8da
+3 -1
View File
@@ -51,7 +51,9 @@ pub fn set_osu_user_config_vals(
osu_folder_path: &str,
key_values: &[(&str, Option<&str>)],
) -> Result<bool, String> {
let current_user = std::env::var("USERNAME").unwrap_or_else(|_| "Admin".to_string());
let current_user = std::env::var("USERNAME")
.or_else(|_| std::env::var("USER"))
.unwrap_or_else(|_| "Admin".to_string());
let osu_config_path = Path::new(osu_folder_path).join(format!("osu!.{}.cfg", current_user));
if !osu_config_path.exists() {