From fef594708eec1c1d26b54c26b09e40f1df1ed99c Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Thu, 18 May 2023 08:50:35 -0400 Subject: [PATCH] FileSystemAccessServer: Return EPERM for denied prompts Instead of showing an ambiguous "Unknown error" when FSAS approval is denied, let's affirm the user's action wasn't permitted if they reject the prompt. --- .../Services/FileSystemAccessServer/ConnectionFromClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Services/FileSystemAccessServer/ConnectionFromClient.cpp b/Userland/Services/FileSystemAccessServer/ConnectionFromClient.cpp index 2b1710a5ea..573fb51e67 100644 --- a/Userland/Services/FileSystemAccessServer/ConnectionFromClient.cpp +++ b/Userland/Services/FileSystemAccessServer/ConnectionFromClient.cpp @@ -83,7 +83,7 @@ void ConnectionFromClient::request_file_handler(i32 request_id, i32 window_serve async_handle_prompt_end(request_id, 0, IPC::File(*file.release_value(), IPC::File::CloseAfterSending), path); } } else { - async_handle_prompt_end(request_id, -1, Optional {}, path); + async_handle_prompt_end(request_id, EPERM, Optional {}, path); } }