From a075debb0538e8319377d3ba32961773f67e985e Mon Sep 17 00:00:00 2001 From: LazyYuuki Date: Wed, 18 Jun 2025 14:02:36 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20window=20path=20problem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/core/setup.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/core/setup.rs b/src-tauri/src/core/setup.rs index 602080378..c2d3499f3 100644 --- a/src-tauri/src/core/setup.rs +++ b/src-tauri/src/core/setup.rs @@ -247,7 +247,10 @@ pub fn setup_sidecar(app: &App) -> Result<(), String> { ]); #[cfg(target_os = "windows")] { - cmd = cmd.current_dir(app_handle_for_spawn.path().resource_dir().unwrap()); + let resource_dir = app_handle_for_spawn.path().resource_dir().unwrap(); + let normalized_path = resource_dir.to_string_lossy().replace(r"\\?\", ""); + let normalized_pathbuf = PathBuf::from(normalized_path); + cmd = cmd.current_dir(normalized_pathbuf); } #[cfg(not(target_os = "windows"))]