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:
parent
b1d8404c92
commit
3d914247cc
7 changed files with 58 additions and 57 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue