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 dc0e51a commit 5290e58Copy full SHA for 5290e58
oneport/src/config.rs
@@ -69,7 +69,12 @@ async fn find_config(file: Option<String>) -> Option<String> {
69
Ok(v) => v,
70
_ => continue,
71
};
72
- let config = String::from_utf8(config).unwrap_or_default();
+ let config = if config[..3] == vec![0xEF, 0xBB, 0xBF] {
73
+ &config[3..]
74
+ } else {
75
+ &config
76
+ };
77
+ let config = String::from_utf8_lossy(config).to_string();
78
return Some(config);
79
}
80
None
0 commit comments