diff --git a/Userland/Libraries/LibFileSystemAccessClient/Client.cpp b/Userland/Libraries/LibFileSystemAccessClient/Client.cpp index 5f4a039af5..703f7d9f3b 100644 --- a/Userland/Libraries/LibFileSystemAccessClient/Client.cpp +++ b/Userland/Libraries/LibFileSystemAccessClient/Client.cpp @@ -122,7 +122,7 @@ void Client::handle_prompt_end(i32 request_id, i32 error, Optional co if (error != 0) { // We don't want to show an error message for non-existent files since some applications may want // to handle it as opening a new, named file. - if (error != -1 && error != ENOENT) + if (error != ECANCELED && error != ENOENT) GUI::MessageBox::show_error(request_data.parent_window, DeprecatedString::formatted("Opening \"{}\" failed: {}", *chosen_file, strerror(error))); request_data.promise->resolve(Error::from_errno(error)).release_value_but_fixme_should_propagate_errors(); return; diff --git a/Userland/Services/FileSystemAccessServer/ConnectionFromClient.cpp b/Userland/Services/FileSystemAccessServer/ConnectionFromClient.cpp index dfc25edae3..020ea3415e 100644 --- a/Userland/Services/FileSystemAccessServer/ConnectionFromClient.cpp +++ b/Userland/Services/FileSystemAccessServer/ConnectionFromClient.cpp @@ -156,7 +156,7 @@ void ConnectionFromClient::prompt_helper(i32 request_id, Optional {}, Optional {}); + async_handle_prompt_end(request_id, ECANCELED, Optional {}, Optional {}); } }