mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 22:14:53 +02:00
Atomically update cached values file
This commit is contained in:
@@ -31,7 +31,7 @@ func (self *CachedValues[T]) Load() T {
|
||||
func (self *CachedValues[T]) Save() {
|
||||
raw, err := json.Marshal(self.Opts)
|
||||
if err == nil {
|
||||
os.WriteFile(self.Path(), raw, 0600)
|
||||
AtomicUpdateFile(self.Path(), raw, 0o600)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user