edit-util: do not try to recreate temp file if missing
authorMike Yuan <me@yhndnzj.com>
Sun, 11 Aug 2024 13:41:30 +0000 (15:41 +0200)
committerLuca Boccassi <bluca@debian.org>
Thu, 15 Aug 2024 13:04:41 +0000 (14:04 +0100)
commite608023bc8eabb29df6c4718c93c6e47fda9f881
tree0c828af410346e76544f0d93fc49d3281e997776
parentb628d4dfa61234d28ffaa648ec09c5e9972f832a
edit-util: do not try to recreate temp file if missing

We initially read from temp file, then strip it, and write
back to it. If the file suddenly disappeared during the process,
it indicates someone else is touching our temp file
behind our back. Let's not silently continue.

(cherry picked from commit 3b5b2ff8fa6413afc2e5a058ea8281a58a4c691d)
src/shared/edit-util.c