diff --git a/external/solanaceae_object_store b/external/solanaceae_object_store index 4d3ffb8..4695579 160000 --- a/external/solanaceae_object_store +++ b/external/solanaceae_object_store @@ -1 +1 @@ -Subproject commit 4d3ffb8192623740f6e170855ee1cffd428b78da +Subproject commit 46955795b034ed4b058958bba620bd8965ce91f7 diff --git a/src/fragment_store/convert_frag_to_obj.cpp b/src/fragment_store/convert_frag_to_obj.cpp index dc32637..7881431 100644 --- a/src/fragment_store/convert_frag_to_obj.cpp +++ b/src/fragment_store/convert_frag_to_obj.cpp @@ -93,6 +93,20 @@ int main(int argc, const char** argv) { } } + // WARNING: manual and hardcoded + // manually upconvert message json to msgpack (v1 to v2) + if (true && e.e.get().v == 1) { + // TODO: error handling + const auto j = nlohmann::json::parse(tmp_buffer); + + if (false) { + e.e.replace(uint16_t(2)); + + // overwrite og + tmp_buffer = nlohmann::json::to_msgpack(j); + } + } + // we dont copy meta file type, it will be the same for all "new" objects auto oh = _fsb_dst.newObject(ByteSpan{e.e.get().v}); @@ -121,22 +135,10 @@ int main(int argc, const char** argv) { } } - // WARNING: manual and hardcoded - // manually upconvert message json to msgpack (v1 to v2) - if (true && oh.get().v == 1) { - // TODO: error handling - const auto j = nlohmann::json::parse(tmp_buffer); - - if (false) { - oh.replace(uint16_t(2)); - - // overwrite og - tmp_buffer = nlohmann::json::to_msgpack(j); - } - } - static_cast(_fsb_dst).write(oh, ByteSpan{tmp_buffer}); + //assert(std::filesystem::file_size(e.e.get().path) == std::filesystem::file_size(oh.get().path)); + return false; }