From 9ca6cd924c1585b8c9f52489fd105f4a4bac0cf7 Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Tue, 29 Mar 2022 15:05:47 -0400 Subject: [PATCH] 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 --- lib/ftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } }