On 8/1/20 11:31 pm, Dave Reisner wrote: > On Wed, Jan 8, 2020, 07:30 Allan McRae <al...@archlinux.org> wrote: > >> Sync databases (and signatures) are downloaded into a temporary directory. >> On success, they are copied into the sync directory. >> > Why not use a temporary file in the sync dir? That allows you to rename > atomically instead of copy+unlink. My guess is it's less code, too.
Two reasons - both may be wrong! 1) that looked difficult with _alpm_download. 2) I was hoping keeping the file names the same would mean minimal changes to get signature validation working on the newly downloaded db. What I could do, is create the temp directory inside the sync directory. Allan