1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-22 14:39:24 -05:00

Tim Kosse points out that xfer_upload_gotpkt can return a negative

value on error, so the check at the call site shouldn't test for
exactly zero.

[originally from svn r8183]
This commit is contained in:
Simon Tatham 2008-09-16 12:48:38 +00:00
parent 9c6a1127b4
commit 2a0cf16c33

View File

@ -707,7 +707,7 @@ int sftp_put_file(char *fname, char *outfname, int recurse, int restart)
if (!xfer_done(xfer)) { if (!xfer_done(xfer)) {
pktin = sftp_recv(); pktin = sftp_recv();
ret = xfer_upload_gotpkt(xfer, pktin); ret = xfer_upload_gotpkt(xfer, pktin);
if (!ret) { if (ret <= 0 && !err) {
printf("error while writing: %s\n", fxp_error()); printf("error while writing: %s\n", fxp_error());
err = 1; err = 1;
} }