继续收敛编辑器桥与预览任务错误
保留 Godot 归属与编辑器 fence 的底层存储原因 保留资源预览 worker JoinError
This commit is contained in:
@@ -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<bool, Str
|
||||
match std::fs::read_dir(root.join(".godot/agc")) {
|
||||
Ok(mut entries) => 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},继续阻断执行")),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ impl ProjectResourcePreviewReadManager {
|
||||
Ok(result)
|
||||
})
|
||||
.await
|
||||
.map_err(|_| "资源预览读取任务异常结束".to_string())?;
|
||||
.map_err(|error| format!("资源预览读取任务异常结束:{error}"))?;
|
||||
result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user