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

@@ -112,7 +112,7 @@ namespace hex::plugin::builtin {
.basePath = "bookmarks.json",
.required = false,
.load = [](prv::Provider *provider, const std::fs::path &basePath, Tar &tar) -> bool {
auto fileContent = tar.read(basePath);
auto fileContent = tar.readString(basePath);
if (fileContent.empty())
return true;
@@ -124,7 +124,7 @@ namespace hex::plugin::builtin {
nlohmann::json data;
bool result = ViewBookmarks::exportBookmarks(provider, data);
tar.write(basePath, data.dump(4));
tar.writeString(basePath, data.dump(4));
return result;
}
@@ -403,7 +403,7 @@ namespace hex::plugin::builtin {
nlohmann::json json;
exportBookmarks(ImHexApi::Provider::get(), json);
wolv::io::File(path, wolv::io::File::Mode::Create).write(json.dump(4));
wolv::io::File(path, wolv::io::File::Mode::Create).writeString(json.dump(4));
});
}, []{
return ImHexApi::Provider::isValid() && !ProviderExtraData::getCurrent().bookmarks.empty();