Преглед на файлове

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.
thankyouverycool преди 2 години
родител
ревизия
fef594708e
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      Userland/Services/FileSystemAccessServer/ConnectionFromClient.cpp

+ 1 - 1
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<IPC::File> {}, path);
+        async_handle_prompt_end(request_id, EPERM, Optional<IPC::File> {}, path);
     }
 }