aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/gc.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-05-02 17:01:09 +0200
committerGitHub Enterprise <[email protected]>2024-05-02 17:01:09 +0200
commit375fa71cb816acb25bd2eaf24ef5cc292a1f2c36 (patch)
tree7d8e20b99bd65af37f75cb95f18c0c0001e58dcd /src/zenstore/gc.cpp
parentbatch cache put (#67) (diff)
downloadzen-375fa71cb816acb25bd2eaf24ef5cc292a1f2c36.tar.xz
zen-375fa71cb816acb25bd2eaf24ef5cc292a1f2c36.zip
use write and move in place for safer writing of files (#70)
* use write and move in place for safer writing of files
Diffstat (limited to 'src/zenstore/gc.cpp')
-rw-r--r--src/zenstore/gc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/zenstore/gc.cpp b/src/zenstore/gc.cpp
index 39a747dae..e8cf6ec5e 100644
--- a/src/zenstore/gc.cpp
+++ b/src/zenstore/gc.cpp
@@ -169,7 +169,7 @@ LoadCompactBinaryObject(const fs::path& Path)
void
SaveCompactBinaryObject(const fs::path& Path, const CbObject& Object)
{
- WriteFile(Path, Object.GetBuffer().AsIoBuffer());
+ TemporaryFile::SafeWriteFile(Path, Object.GetBuffer().GetView());
}
//////////////////////////////////////////////////////////////////////////