fix: update file permission syntax in saveStoreUnsafe for consistency
This commit is contained in:
parent
765e90a5b6
commit
6636be09c4
1 changed files with 1 additions and 1 deletions
|
|
@ -345,7 +345,7 @@ func (cs *CronService) saveStoreUnsafe() error {
|
||||||
// truncation and completion leaves an empty or partial file.
|
// truncation and completion leaves an empty or partial file.
|
||||||
// os.Rename on the same filesystem is atomic on Linux.
|
// os.Rename on the same filesystem is atomic on Linux.
|
||||||
tmpPath := cs.storePath + ".tmp"
|
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 err
|
||||||
}
|
}
|
||||||
return os.Rename(tmpPath, cs.storePath)
|
return os.Rename(tmpPath, cs.storePath)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue