sys: Updated to use the new HttpRequest helper instead of Net

This commit is contained in:
WerWolv
2023-03-23 11:23:07 +01:00
parent e7e2af9f91
commit 15be24db62
32 changed files with 274 additions and 562 deletions

View File

@@ -7,7 +7,6 @@
#include <hex/data_processor/node.hpp>
#include <filesystem>
#include <fstream>
#include <nlohmann/json.hpp>
@@ -69,7 +68,7 @@ namespace hex {
wolv::io::File file(dir / SettingsFile, wolv::io::File::Mode::Create);
if (file.isValid()) {
file.write(getSettingsData().dump(4));
file.writeString(getSettingsData().dump(4));
break;
}
}

View File

@@ -40,7 +40,7 @@ namespace hex {
return false;
{
const auto metadataContent = tar.read(MetadataPath);
const auto metadataContent = tar.readVector(MetadataPath);
if (!std::string(metadataContent.begin(), metadataContent.end()).starts_with(MetadataHeaderMagic))
return false;
@@ -131,7 +131,7 @@ namespace hex {
{
const auto metadataContent = hex::format("{}\n{}", MetadataHeaderMagic, IMHEX_VERSION);
tar.write(MetadataPath, metadataContent);
tar.writeString(MetadataPath, metadataContent);
}
ImHexApi::Provider::resetDirty();