mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-20 23:44:59 +02:00
Atomically update cached values file
This commit is contained in:
@@ -24,6 +24,7 @@ func AtomicWriteFile(path string, data []byte, perm os.FileMode) (err error) {
|
||||
f.Close()
|
||||
if !removed {
|
||||
os.Remove(f.Name())
|
||||
removed = true
|
||||
}
|
||||
}()
|
||||
_, err = f.Write(data)
|
||||
|
||||
Reference in New Issue
Block a user