From 0bd57c0f66354345eac1d1654a56860919254b4c Mon Sep 17 00:00:00 2001 From: simon Date: Tue, 16 Sep 2008 12:48:38 +0000 Subject: [PATCH] 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. git-svn-id: svn://svn.tartarus.org/sgt/putty@8183 cda61777-01e9-0310-a592-d414129be87e --- psftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psftp.c b/psftp.c index cb5add3f..63446d4d 100644 --- a/psftp.c +++ b/psftp.c @@ -707,7 +707,7 @@ int sftp_put_file(char *fname, char *outfname, int recurse, int restart) if (!xfer_done(xfer)) { pktin = sftp_recv(); ret = xfer_upload_gotpkt(xfer, pktin); - if (!ret) { + if (ret <= 0 && !err) { printf("error while writing: %s\n", fxp_error()); err = 1; } -- 2.11.0