From 63ff5873d883f0c0353876b00818ab5085c59e1b Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Mon, 6 Sep 2021 01:25:44 -0400 Subject: [PATCH] PDFViewer: Open CLI files through FileSystemAccessServer without prompt Use `request_file_read_only_approved()` for the file (if any) is specified through a command line argument. --- Userland/Applications/PDFViewer/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Applications/PDFViewer/main.cpp b/Userland/Applications/PDFViewer/main.cpp index fc1d042a79..9d69940e52 100644 --- a/Userland/Applications/PDFViewer/main.cpp +++ b/Userland/Applications/PDFViewer/main.cpp @@ -45,7 +45,7 @@ int main(int argc, char** argv) window->set_icon(app_icon.bitmap_for_size(16)); if (argc >= 2) { - auto response = FileSystemAccessClient::Client::the().request_file(window->window_id(), argv[1], Core::OpenMode::ReadOnly); + auto response = FileSystemAccessClient::Client::the().request_file_read_only_approved(window->window_id(), argv[1]); if (response.error != 0) { if (response.error != -1)