From 6cf2373b3484ca1e620ed66c1667c7e5749ed8f4 Mon Sep 17 00:00:00 2001 From: huzibaca Date: Tue, 26 Nov 2024 03:30:15 +0800 Subject: [PATCH] chore: update --- src-tauri/src/utils/help.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/utils/help.rs b/src-tauri/src/utils/help.rs index ea2ed9bc..b5c8dcda 100644 --- a/src-tauri/src/utils/help.rs +++ b/src-tauri/src/utils/help.rs @@ -126,7 +126,7 @@ pub fn open_file(app: tauri::AppHandle, path: PathBuf) -> Result<()> { // 如果 VS Code 存在就用它打开,否则用系统默认程序 if vscode_exists { - if let Err(err) = open::with(&path.as_os_str(), code) { + if let Err(err) = app.shell().open(&path.as_os_str(), code) { log::error!(target: "app", "Failed to open with VS Code: {}", err); app.shell().open(path.to_string_lossy(), None)?; }