LibFileSystemAccessClient: Return an errno instead of a string literal

Returning an errno to ease error transmission over IPC.
This commit is contained in:
Lucas CHOLLET 2022-02-27 19:59:17 +01:00 committed by Linus Groh
parent 9521952f36
commit deb525fd9d
Notes: sideshowbarker 2024-07-17 09:56:40 +09:00

View file

@ -146,7 +146,7 @@ void Client::handle_prompt_end(i32 request_id, i32 error, Optional<IPC::File> co
if (file->is_directory()) {
GUI::MessageBox::show_error(request_data.parent_window, String::formatted("Opening \"{}\" failed: Cannot open directory", *chosen_file));
request_data.promise->resolve(Error::from_string_literal("Cannot open directory"sv));
request_data.promise->resolve(Error::from_errno(EISDIR));
return;
}