mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 21:27:34 +00:00
3DFileViewer: Properly handle ENOENT errors
This commit is contained in:
parent
8534506ab0
commit
e2b0cacb89
1 changed files with 3 additions and 2 deletions
|
@ -569,7 +569,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
window->show();
|
window->show();
|
||||||
|
|
||||||
auto file = FileSystemAccessClient::Client::the().request_file_read_only_approved(window, filename);
|
auto file = FileSystemAccessClient::Client::the().request_file_read_only_approved(window, filename);
|
||||||
if (file.is_error() && file.error().code() != ENOENT) {
|
if (file.is_error()) {
|
||||||
|
if (file.error().code() != ENOENT)
|
||||||
GUI::MessageBox::show(window, DeprecatedString::formatted("Opening \"{}\" failed: {}", filename, strerror(errno)), "Error"sv, GUI::MessageBox::Type::Error);
|
GUI::MessageBox::show(window, DeprecatedString::formatted("Opening \"{}\" failed: {}", filename, strerror(errno)), "Error"sv, GUI::MessageBox::Type::Error);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue