X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=sftp.c;h=dbbd740109c2efedb90c7e4113021e3805c6fd12;hb=510f49e405e71ba5c97875e7a019364e1ef5fac9;hp=3357876c20f2eaebfe032dd4fd5eaa752cc84992;hpb=09b74971c768b7d74484040ce155d117aff3f237;p=PuTTY.git diff --git a/sftp.c b/sftp.c index 3357876c..dbbd7401 100644 --- a/sftp.c +++ b/sftp.c @@ -658,11 +658,12 @@ struct sftp_request *fxp_close_send(struct fxp_handle *handle) return req; } -void fxp_close_recv(struct sftp_packet *pktin, struct sftp_request *req) +int fxp_close_recv(struct sftp_packet *pktin, struct sftp_request *req) { sfree(req); fxp_got_status(pktin); sftp_pkt_free(pktin); + return fxp_errtype == SSH_FX_OK; } struct sftp_request *fxp_mkdir_send(const char *path) @@ -1225,6 +1226,7 @@ int xfer_download_gotpkt(struct fxp_xfer *xfer, struct sftp_packet *pktin) if ((rr->retlen < 0 && fxp_error_type()==SSH_FX_EOF) || rr->retlen == 0) { xfer->eof = TRUE; + rr->retlen = 0; rr->complete = -1; #ifdef DEBUG_DOWNLOAD printf("setting eof\n");