From e1bb41d15291da414f744bad92e74a5169876b6c Mon Sep 17 00:00:00 2001 From: jacob Date: Wed, 28 Jul 2004 11:04:22 +0000 Subject: [PATCH] Another wart in the command-line processing: if the user just specifies `-load sessname', and that mentions a hostname, that should be sufficient to start a connection. git-svn-id: svn://svn.tartarus.org/sgt/putty@4369 cda61777-01e9-0310-a592-d414129be87e --- psftp.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/psftp.c b/psftp.c index 079a61f3..e5374c5f 100644 --- a/psftp.c +++ b/psftp.c @@ -2067,6 +2067,15 @@ int psftp_main(int argc, char *argv[]) back = NULL; /* + * If the loaded session provides a hostname, and a hostname has not + * otherwise been specified, pop it in `userhost' so that + * `psftp -load sessname' is sufficient to start a session. + */ + if (!userhost && cfg.host[0] != '\0') { + userhost = dupstr(cfg.host); + } + + /* * If a user@host string has already been provided, connect to * it now. */ -- 2.11.0