sync: collector/ 同步自 inkstone/arcrun-rag@10eb2cb(桌面小幫手 0.18.53)

This commit is contained in:
2026-09-14 07:05:34 +08:00
parent bce422f6fe
commit e4327ecd37
13 changed files with 820 additions and 22 deletions
+2 -1
View File
@@ -488,7 +488,8 @@ func SaveFolderTreeStore(path string, s FolderTreeStore) error {
if err != nil {
return err
}
return os.WriteFile(path, data, 0o644)
// #200:一輪途中每份檔都會重寫這個檔,而小幫手展開樹時會定期重讀 ⇒ 原子寫入(見 writeFileAtomic)。
return writeFileAtomic(path, data, 0o644)
}
// MergeFolderTreeStore 把「這一輪算出來的樹」併進上一輪的快照。