static void ssh_scp_init(void)
{
while (!back->sendok(backhandle)) {
- if (ssh_sftp_loop_iteration() < 0)
+ if (back->exitcode(backhandle) >= 0) {
+ errs++;
+ return;
+ }
+ if (ssh_sftp_loop_iteration() < 0) {
+ errs++;
return; /* doom */
+ }
}
/* Work out which backend we ended up using. */
back->provide_logctx(backhandle, logctx);
console_provide_logctx(logctx);
ssh_scp_init();
- if (verbose && realhost != NULL)
+ if (verbose && realhost != NULL && errs == 0)
tell_user(stderr, "Connected to %s\n", realhost);
sfree(realhost);
}
host = src;
src = colon(src);
if (src == NULL)
- bump("Local to local copy not supported");
+ bump("Local file listing not supported");
*src++ = '\0';
if (*src == '\0')
src = ".";