From: Simon Ruderich Date: Tue, 18 Feb 2020 05:02:17 +0000 (+0100) Subject: Use github.com/google/renameio for atomic file updates X-Git-Tag: 0.2~9 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=4d994341317c2e700370950bd5fd9ac05963fc66;hp=4d994341317c2e700370950bd5fd9ac05963fc66;p=nsscash%2Fnsscash.git Use github.com/google/renameio for atomic file updates 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. ---