]> git.sesse.net Git - plocate/commitdiff
Make DatabaseBuilder write the file atomically.
authorSteinar H. Gunderson <steinar+nageru@gunderson.no>
Sat, 21 Nov 2020 14:34:59 +0000 (15:34 +0100)
committerSteinar H. Gunderson <steinar+nageru@gunderson.no>
Sat, 21 Nov 2020 14:34:59 +0000 (15:34 +0100)
By opening with O_TMPFILE, we guarantee we'll never be leaving
an unfinished file visible on the filesystem. The move across the
old one isn't atomic, but the window of failure is very small now.


No differences found