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() {