From a64a8e84bd079f5f21d36916a3459ca4e392071a Mon Sep 17 00:00:00 2001 From: Muse Date: Sat, 14 Nov 2026 16:47:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(rust):=20reveal=20=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E6=97=B6=E9=87=8D=E5=A4=8D=E4=BA=86=20rename?= =?UTF-8?q?=5Fpath=20=E7=9A=84=20tauri::command=20=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=EF=BC=88Windows=20=E6=9E=84=E5=BB=BA=20E0428=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/commands.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src-tauri/src/commands.rs b/src-tauri/src/commands.rs index c53d6ae..1eee1cf 100644 --- a/src-tauri/src/commands.rs +++ b/src-tauri/src/commands.rs @@ -426,7 +426,6 @@ pub fn create_dir(path: String) -> Result<(), String> { fs::create_dir_all(&path).map_err(|e| format!("创建文件夹失败:{e}")) } -/// 重命名/移动文件或文件夹;目标已存在时报错。 /// 在 Windows 资源管理器中定位路径:打开父目录并选中该文件/文件夹。 /// explorer 即使成功也常以退出码 1 结束,因此只 spawn 不等结果。 #[tauri::command] @@ -441,7 +440,7 @@ pub fn reveal_in_explorer(path: String) -> Result<(), String> { Ok(()) } -#[tauri::command] +/// 重命名/移动文件或文件夹;目标已存在时报错。 #[tauri::command] pub fn rename_path(from: String, to: String) -> Result<(), String> { if Path::new(&to).exists() {