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
+10 -5
+10 -5
View File
@@ -23,11 +23,16 @@ fn get_os() -> String {
.map(String::from)
.collect();
let os = contents[0]
.trim_start_matches("NAME=")
.trim_matches('"')
.to_string();
return os;
for line in &contents {
if line.starts_with("NAME=") {
return line
.trim_start_matches("NAME=")
.trim_matches('"')
.to_string();
}
}
return String::new();
}
#[cfg(unix)]