From 701a92dea5e37f860e83d5787bb022b35208be0b Mon Sep 17 00:00:00 2001 From: ppc Date: Sat, 21 Feb 2026 14:11:44 +0000 Subject: [PATCH] fix file path handling --- amnet-server/src/config.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/amnet-server/src/config.rs b/amnet-server/src/config.rs index 008a80d..6175960 100644 --- a/amnet-server/src/config.rs +++ b/amnet-server/src/config.rs @@ -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)