]> ruderich.org/simon Gitweb - nsscash/nsscash.git/commitdiff
Use github.com/google/renameio for atomic file updates
authorSimon Ruderich <simon@ruderich.org>
Tue, 18 Feb 2020 05:02:17 +0000 (06:02 +0100)
committerSimon Ruderich <simon@ruderich.org>
Tue, 18 Feb 2020 05:02:17 +0000 (06:02 +0100)
This also fixes a very unlikely race condition which could delete a
temporary file from a concurrent nsscash run if it chooses the same
temporary file name after os.Rename() was called but before our deferred
os.Remove() remove it. This race would cause the second nsscash run to
fail but not cause any corruption of persistent files.


No differences found