fix file path handling

This commit is contained in:
ppc
2026-02-21 14:18:39 +00:00
parent 3f17f9b432
commit 701a92dea5
+6 -3
View File
@@ -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)