1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

FTP: fix uploading ASCII with unknown size

... don't try to increase the supposed file size on newlines if we don't
know what file size it is!

Patch-by: lzsiga
This commit is contained in:
Daniel Stenberg 2015-09-26 23:36:25 +02:00
parent 119037325d
commit 32fc638ddf

View File

@ -923,7 +923,8 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
if(!data->set.crlf) {
/* we're here only because FTP is in ASCII mode...
bump infilesize for the LF we just added */
data->state.infilesize++;
if(data->state.infilesize != -1)
data->state.infilesize++;
}
}
else