1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:27:35 +00:00

HexEditor: Port to Core::Stream

This commit is contained in:
Lucas CHOLLET 2023-01-14 21:47:50 -05:00 committed by Andrew Kaster
parent b1d8404c92
commit 3d914247cc
7 changed files with 58 additions and 57 deletions

View file

@ -53,10 +53,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (arguments.argc > 1) {
// FIXME: Using `try_request_file_read_only_approved` doesn't work here since the file stored in the editor is only readable.
auto response = FileSystemAccessClient::Client::the().try_request_file_deprecated(window, arguments.strings[1], Core::OpenMode::ReadWrite);
auto response = FileSystemAccessClient::Client::the().request_file(window, arguments.strings[1], Core::Stream::OpenMode::ReadWrite);
if (response.is_error())
return 1;
hex_editor_widget->open_file(response.value());
hex_editor_widget->open_file(response.value().filename(), response.value().release_stream());
}
return app->exec();