From 84bd24807d39dafd7648cf01f397c31a6b977520 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Tue, 2 Apr 2024 17:48:15 +0200 Subject: [PATCH] small change to flush work space. writing new frags is broken rn --- src/fragment_store/file2_zstd.cpp | 5 +++++ src/fragment_store/file2_zstd.hpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/fragment_store/file2_zstd.cpp b/src/fragment_store/file2_zstd.cpp index 4ccb58bc..f3ba0ab6 100644 --- a/src/fragment_store/file2_zstd.cpp +++ b/src/fragment_store/file2_zstd.cpp @@ -15,6 +15,11 @@ File2ZSTDW::File2ZSTDW(File2I& real) : ZSTD_CCtx_setParameter(_cctx.get(), ZSTD_c_checksumFlag, 1); // add extra checksums (to frames?) } +File2ZSTDW::~File2ZSTDW(void) { + // flush remaining data (and maybe header) + // actually nvm, write will always flush all data, so only on empty files this would be an issue +} + bool File2ZSTDW::isGood(void) { return _real_file.isGood(); } diff --git a/src/fragment_store/file2_zstd.hpp b/src/fragment_store/file2_zstd.hpp index 7646374a..110b5a34 100644 --- a/src/fragment_store/file2_zstd.hpp +++ b/src/fragment_store/file2_zstd.hpp @@ -15,7 +15,7 @@ struct File2ZSTDW : public File2I { std::unique_ptr _cctx{ZSTD_createCCtx(), &ZSTD_freeCCtx}; File2ZSTDW(File2I& real); - virtual ~File2ZSTDW(void) {} + virtual ~File2ZSTDW(void); bool isGood(void) override;