New option to allow use of the local OS username for login to the remote side
[u/mdw/putty] / psftp.c
diff --git a/psftp.c b/psftp.c
index cb5add3..63446d4 100644 (file)
--- 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;
            }