]> git.hungrycats.org Git - bees/commitdiff
hash: let's not have multiple temporary file extensions
authorZygo Blaxell <bees@furryterror.org>
Sat, 22 Aug 2026 19:12:40 +0000 (15:12 -0400)
committerZygo Blaxell <bees@furryterror.org>
Sat, 5 Sep 2026 04:03:58 +0000 (00:03 -0400)
'rm -f *.tmp' should always suffice.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
src/bees-hash.cc

index 1dc206d152393fd524bee9c1ed6ef9b168017b8e..e9da900629f3ff3272c563724f8c6d93da137de0 100644 (file)
@@ -1014,7 +1014,7 @@ BeesHashTable::resize_file(off_t new_size_signed)
 
        // Write the populated new table to a temp file, fsync, rename over
        // the original.  Crash-safety relies on the rename being atomic.
-       const string tmp_filename = m_filename + ".resize";
+       const string tmp_filename = m_filename + ".tmp";
        BEESNOTE("writing resized hash table to '" << tmp_filename << "'");
        BEESLOGINFO("Writing resized hash table to '" << tmp_filename << "'");
        unlinkat(m_ctx->home_fd(), tmp_filename.c_str(), 0);