1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Half of Lars Gunnarsson's iXplorer compatibility patch: the PSFTP

login prompt should be fflushed (presumably fgets fails to implicitly
do this when stdin and stdout are redirected weirdly).

[originally from svn r2186]
This commit is contained in:
Simon Tatham 2002-11-03 08:46:35 +00:00
parent d54e79bde6
commit c5114a92a6

View File

@ -1769,6 +1769,7 @@ static int psftp_connect(char *userhost, char *user, int portnumber)
}
if (!cfg.username[0]) {
printf("login as: ");
fflush(stdout);
if (!fgets(cfg.username, sizeof(cfg.username), stdin)) {
fprintf(stderr, "psftp: aborting\n");
cleanup_exit(1);