X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/9d210cac4691e1c74644c9d0b6a25d3a36af648e..479fe1ba750b1cda0ad3a159f2727619555436b0:/psftp.c diff --git a/psftp.c b/psftp.c index 7bc556ee..0eedf9d2 100644 --- a/psftp.c +++ b/psftp.c @@ -201,7 +201,7 @@ int sftp_get_file(char *fname, char *outfname, int recurse, int restart, struct fxp_xfer *xfer; uint64 offset; FILE *fp; - int ret; + int ret, shown_err = FALSE; /* * In recursive mode, see if we're dealing with a directory. @@ -443,7 +443,10 @@ int sftp_get_file(char *fname, char *outfname, int recurse, int restart, ret = xfer_download_gotpkt(xfer, pktin); if (ret < 0) { - printf("error while reading: %s\n", fxp_error()); + if (!shown_err) { + printf("error while reading: %s\n", fxp_error()); + shown_err = TRUE; + } ret = 0; }