🟡 [M8] 配置写入非原子,并发读取可能回退默认 #18
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
文件:
core/config.rs:67-94分类: 并发 / 配置
问题:
std::fs::write非原子,并发read_to_string可能读到部分 TOML → 解析失败 → 静默回退默认值。建议修复: 写入临时文件 →
sync_all→ atomic rename;区分文件不存在和解析错误。