1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-06-30 19:12:48 -05:00

Special backend init error handling for pterm.

Fixes a cosmetic issue where the new ConPTY error added in 4ae8b742ab
had an ugly "Unable to open connection to".

(Arguably this ought to test a backend property rather than
cmdline_tooltype.)
This commit is contained in:
Jacob Nevins
2022-05-24 13:32:55 +01:00
parent 56458a1491
commit c5d837c14a
2 changed files with 20 additions and 7 deletions

View File

@ -5165,9 +5165,16 @@ static void start_backend(GtkFrontend *inst)
conf_get_bool(inst->conf, CONF_tcp_keepalives));
if (error) {
seat_connection_fatal(&inst->seat,
"Unable to open connection to %s:\n%s",
conf_dest(inst->conf), error);
if (cmdline_tooltype & TOOLTYPE_NONNETWORK) {
/* Special case for pterm. */
seat_connection_fatal(&inst->seat,
"Unable to open terminal:\n%s",
error);
} else {
seat_connection_fatal(&inst->seat,
"Unable to open connection to %s:\n%s",
conf_dest(inst->conf), error);
}
sfree(error);
inst->exited = true;
return;