fix: save history

This commit is contained in:
2026-02-05 01:14:44 +08:00
parent 3588c49d7d
commit 4b7a4eb36d
6 changed files with 51 additions and 13 deletions

View File

@@ -15,7 +15,7 @@ func (s *Service) SaveHistory() {
if err != nil {
return
}
file, err := os.OpenFile(historyPath, os.O_CREATE|os.O_RDWR, os.FileMode(0644))
file, err := os.OpenFile(historyPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)
if err != nil {
return
}