import os and zstdfile2 bugfixes
This commit is contained in:
parent
7b4af58544
commit
de3b8f059e
2
external/solanaceae_object_store
vendored
2
external/solanaceae_object_store
vendored
@ -1 +1 @@
|
||||
Subproject commit 4d3ffb8192623740f6e170855ee1cffd428b78da
|
||||
Subproject commit 46955795b034ed4b058958bba620bd8965ce91f7
|
@ -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<ObjComp::MessagesVersion>().v == 1) {
|
||||
// TODO: error handling
|
||||
const auto j = nlohmann::json::parse(tmp_buffer);
|
||||
|
||||
if (false) {
|
||||
e.e.replace<ObjComp::MessagesVersion>(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<ObjComp::ID>().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<ObjComp::MessagesVersion>().v == 1) {
|
||||
// TODO: error handling
|
||||
const auto j = nlohmann::json::parse(tmp_buffer);
|
||||
|
||||
if (false) {
|
||||
oh.replace<ObjComp::MessagesVersion>(uint16_t(2));
|
||||
|
||||
// overwrite og
|
||||
tmp_buffer = nlohmann::json::to_msgpack(j);
|
||||
}
|
||||
}
|
||||
|
||||
static_cast<StorageBackendI&>(_fsb_dst).write(oh, ByteSpan{tmp_buffer});
|
||||
|
||||
//assert(std::filesystem::file_size(e.e.get<ObjComp::Ephemeral::FilePath>().path) == std::filesystem::file_size(oh.get<ObjComp::Ephemeral::FilePath>().path));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user