summaryrefslogtreecommitdiff
path: root/Userland/Applications/3DFileViewer/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Applications/3DFileViewer/main.cpp')
-rw-r--r--Userland/Applications/3DFileViewer/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Applications/3DFileViewer/main.cpp b/Userland/Applications/3DFileViewer/main.cpp
index cea5172399..86c78597b3 100644
--- a/Userland/Applications/3DFileViewer/main.cpp
+++ b/Userland/Applications/3DFileViewer/main.cpp
@@ -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)