From e4d59e2a853a3da0bb8462f2ad0c5ce310cf6c8a Mon Sep 17 00:00:00 2001 From: kdletters <61648117+kdletters@users.noreply.github.com> Date: Tue, 6 Oct 2026 10:25:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=A7=E7=BB=AD=E6=94=B6=E6=95=9B=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=99=A8=E6=A1=A5=E4=B8=8E=E9=A2=84=E8=A7=88=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 保留 Godot 归属与编辑器 fence 的底层存储原因 保留资源预览 worker JoinError --- .../src-tauri/src/editor_adapters/execution.rs | 12 ++++++------ .../src-tauri/src/resource_preview_scheduler.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/editor_adapters/execution.rs b/apps/ai-game-creator-shell/src-tauri/src/editor_adapters/execution.rs index f9b87d922..46a151a0e 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/editor_adapters/execution.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/editor_adapters/execution.rs @@ -210,15 +210,15 @@ fn update_godot_authorized_project_at( if bytes.len() > 64 * 1024 { return Err("Godot 待清理项目归属超过限制".into()); } - let mut temporary = - tempfile::NamedTempFile::new_in(config).map_err(|_| "无法创建 Godot 项目归属记录")?; + let mut temporary = tempfile::NamedTempFile::new_in(config) + .map_err(|error| format!("无法创建 Godot 项目归属记录:{error}"))?; temporary .write_all(&bytes) .and_then(|_| temporary.as_file().sync_all()) - .map_err(|_| "无法持久保存 Godot 项目归属")?; + .map_err(|error| format!("无法持久保存 Godot 项目归属:{error}"))?; temporary .persist(config.join(GODOT_PROJECTS_FILE)) - .map_err(|_| "无法提交 Godot 项目归属记录")?; + .map_err(|error| format!("无法提交 Godot 项目归属记录:{}", error.error))?; Ok(()) } @@ -254,7 +254,7 @@ pub(crate) fn godot_project_cleanup_required(project: &Path) -> Result Ok(entries.next().is_some()), Err(error) if error.kind() == std::io::ErrorKind::NotFound => Ok(false), - Err(_) => Err("无法确认 Godot 桥缓存是否已清理".into()), + Err(error) => Err(format!("无法确认 Godot 桥缓存是否已清理:{error}")), } } @@ -266,7 +266,7 @@ fn remove_fence(path: &Path) -> Result<(), String> { match std::fs::remove_file(path) { Ok(()) => Ok(()), Err(error) if error.kind() == std::io::ErrorKind::NotFound => Ok(()), - Err(_) => Err("无法清理编辑器执行确认记录,继续阻断执行".into()), + Err(error) => Err(format!("无法清理编辑器执行确认记录:{error},继续阻断执行")), } } diff --git a/apps/ai-game-creator-shell/src-tauri/src/resource_preview_scheduler.rs b/apps/ai-game-creator-shell/src-tauri/src/resource_preview_scheduler.rs index 76668d039..f099d34d2 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/resource_preview_scheduler.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/resource_preview_scheduler.rs @@ -146,7 +146,7 @@ impl ProjectResourcePreviewReadManager { Ok(result) }) .await - .map_err(|_| "资源预览读取任务异常结束".to_string())?; + .map_err(|error| format!("资源预览读取任务异常结束:{error}"))?; result }