2.2.4-alpha.0

This commit is contained in:
Tunglies
2025-04-17 15:20:12 +08:00
parent 40de99e65d
commit 1df9fff0a7
3 changed files with 11 additions and 5 deletions

View File

@@ -35,7 +35,7 @@ pub fn get_auto_proxy() -> CmdResult<Mapping> {
#[tauri::command]
pub fn get_system_hostname() -> CmdResult<String> {
use gethostname::gethostname;
// 获取系统主机名处理可能的非UTF-8字符
let hostname = match gethostname().into_string() {
Ok(name) => name,
@@ -46,7 +46,7 @@ pub fn get_system_hostname() -> CmdResult<String> {
fallback.trim_matches('"').to_string()
}
};
Ok(hostname)
}