From: Jay Satiro Date: Tue, 29 Mar 2022 19:05:47 +0000 (-0400) Subject: ftp: fix error message for partial file upload X-Git-Tag: curl-7_83_0~76 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9ca6cd924c1585b8c9f52489fd105f4a4bac0cf7;p=thirdparty%2Fcurl.git ftp: fix error message for partial file upload - Show the count of bytes written on partial file upload. Prior to this change the error message mistakenly showed the count of bytes read, not written. Bug: https://github.com/curl/curl/discussions/8637 Reported-by: Taras Kushnir Closes https://github.com/curl/curl/pull/8649 --- diff --git a/lib/ftp.c b/lib/ftp.c index c6efaedd3d..47df88b000 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -3381,7 +3381,7 @@ static CURLcode ftp_done(struct Curl_easy *data, CURLcode status, (ftp->transfer == PPTRANSFER_BODY)) { failf(data, "Uploaded unaligned file size (%" CURL_FORMAT_CURL_OFF_T " out of %" CURL_FORMAT_CURL_OFF_T " bytes)", - data->req.bytecount, data->state.infilesize); + data->req.writebytecount, data->state.infilesize); result = CURLE_PARTIAL_FILE; } }