mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
sys: Updated to use the new HttpRequest helper instead of Net
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user