mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
Spreadsheet: Use TRY() on file load and save
This commit is contained in:
parent
ca42da23c2
commit
01824fd19a
2 changed files with 4 additions and 12 deletions
|
@ -71,10 +71,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
window->show();
|
||||
|
||||
if (filename) {
|
||||
auto response = FileSystemAccessClient::Client::the().try_request_file_read_only_approved(window, filename);
|
||||
if (response.is_error())
|
||||
return 1;
|
||||
spreadsheet_widget.load_file(*response.value());
|
||||
auto file = TRY(FileSystemAccessClient::Client::the().try_request_file_read_only_approved(window, filename));
|
||||
spreadsheet_widget.load_file(file);
|
||||
}
|
||||
|
||||
return app->exec();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue