mirror of
https://gitea.tendokyu.moe/ppc/amnet.git
synced 2026-09-22 22:28:22 +03:00
fix file path handling
This commit is contained in:
@@ -96,10 +96,13 @@ impl Config {
|
||||
.map(|v| v > 0)
|
||||
.unwrap_or(defaults::AIME_KEYBOARD_ENABLED);
|
||||
|
||||
let aime_txt_path = aime_section
|
||||
let aime_txt_path_raw = aime_section
|
||||
.and_then(|s| s.get("aimePath"))
|
||||
.unwrap_or(defaults::AIME_FILE)
|
||||
.into();
|
||||
.unwrap_or(defaults::AIME_FILE);
|
||||
|
||||
// Normalize backslashes to forward slashes to avoid escape issues
|
||||
let aime_txt_path_str = aime_txt_path_raw.replace("\\", "/");
|
||||
let aime_txt_path = PathBuf::from(aime_txt_path_str);
|
||||
|
||||
let server_listen_address = io_section.get("listenAddress")
|
||||
.unwrap_or(defaults::SERVER_ADDRESS)
|
||||
|
||||
Reference in New Issue
Block a user