fix: update file permission syntax in saveStoreUnsafe for consistency

This commit is contained in:
decker 2026-02-24 08:37:29 +08:00
parent 765e90a5b6
commit 6636be09c4

View file

@ -345,7 +345,7 @@ func (cs *CronService) saveStoreUnsafe() error {
// truncation and completion leaves an empty or partial file.
// os.Rename on the same filesystem is atomic on Linux.
tmpPath := cs.storePath + ".tmp"
if err := os.WriteFile(tmpPath, data, 0600); err != nil {
if err := os.WriteFile(tmpPath, data, 0o600); err != nil {
return err
}
return os.Rename(tmpPath, cs.storePath)