1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

PSFTP: make the 'close' subcommand return success.

A user points out that it always returned failure, even if it
succeeded. As a result, a 'psftp -b' script of the form

  open this.host
  do stuff
  close
  open that.host
  do stuff
  close

would terminate at the first 'close', believing it to have failed, and
PSFTP would exit with a failure status.

(Not only that, but there would be no error message indicating _why_
PSFTP had closed, because when a command returns failure it's expected
to have printed an error message already.)
This commit is contained in:
Simon Tatham 2023-06-07 07:12:58 +01:00
parent 56b16bdc76
commit 6370782de7

View File

@ -1024,7 +1024,7 @@ int sftp_cmd_close(struct sftp_command *cmd)
}
do_sftp_cleanup();
return 0;
return 1;
}
void list_directory_from_sftp_warn_unsorted(void)