Improve OS Name search

This commit is contained in:
nicknase27 committed 2026-10-07 18:45:39 +02:00
1 parent ab4ef70657
commit 5d769f1886
1 file changed
+7 -2
+7 -2
View File
@@ -23,11 +23,16 @@ fn get_os() -> String {
.map(String::from) .map(String::from)
.collect(); .collect();
let os = contents[0] for line in &contents {
if line.starts_with("NAME=") {
return line
.trim_start_matches("NAME=") .trim_start_matches("NAME=")
.trim_matches('"') .trim_matches('"')
.to_string(); .to_string();
return os; }
}
return String::new();
} }
#[cfg(unix)] #[cfg(unix)]