mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-02 06:09:51 +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
Notes:
sideshowbarker
2024-07-17 07:11:12 +09:00
Author: https://github.com/LucasChollet
Commit: f9e3a591d2
Pull-request: https://github.com/SerenityOS/serenity/pull/17023
Reviewed-by: https://github.com/AtkinsSJ
Reviewed-by: https://github.com/awesomekling
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