1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-25 01:02:24 +00:00

Fix sftp_get_file returning success on failed transfers.

Due to the return variable 'ret' being shadowed in the transfer loop, errors
in the transfer loop did not affect the final return value of sftp_get_file.
This particularly affects psftp's batch mode (without passing the -be
command-line argument), which would errorneously continue. The solution is
to simply remove the shadowing declaration.
This commit is contained in:
Tim Kosse 2016-12-28 14:59:49 +01:00 committed by Simon Tatham
parent 24a43404b4
commit 57e21d756e

View File

@ -433,7 +433,7 @@ int sftp_get_file(char *fname, char *outfname, int recurse, int restart)
xfer = xfer_download_init(fh, offset);
while (!xfer_done(xfer)) {
void *vbuf;
int ret, len;
int len;
int wpos, wlen;
xfer_download_queue(xfer);