mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
3DFileViewer: Use LibFSAC
in GLContextWidget::load_path()
It was the only function to not use the `LibFSAC`, it will allow us to: - Not unveil some file - Drop some tests on to-be-read-from file as they are performed in `LibFSAC`.
This commit is contained in:
parent
b4cea1c72e
commit
f9e3a591d2
1 changed files with 3 additions and 3 deletions
|
@ -290,14 +290,14 @@ void GLContextWidget::timer_event(Core::TimerEvent&)
|
|||
|
||||
bool GLContextWidget::load_path(DeprecatedString const& filename)
|
||||
{
|
||||
auto file = Core::DeprecatedFile::construct(filename);
|
||||
auto file = FileSystemAccessClient::Client::the().try_request_file_read_only_approved_deprecated(window(), filename);
|
||||
|
||||
if (!file->open(Core::OpenMode::ReadOnly) && file->error() != ENOENT) {
|
||||
if (!file.is_error() && file.error().code() != ENOENT) {
|
||||
GUI::MessageBox::show(window(), DeprecatedString::formatted("Opening \"{}\" failed: {}", filename, strerror(errno)), "Error"sv, GUI::MessageBox::Type::Error);
|
||||
return false;
|
||||
}
|
||||
|
||||
return load_file(file);
|
||||
return load_file(file.value());
|
||||
}
|
||||
|
||||
bool GLContextWidget::load_file(Core::DeprecatedFile& file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue