Skip to content

Commit

Permalink
FTP: fix uploading ASCII with unknown size
Browse files Browse the repository at this point in the history
... don't try to increase the supposed file size on newlines if we don't
know what file size it is!

Patch-by: lzsiga
  • Loading branch information
bagder committed Sep 26, 2015
1 parent 1190373 commit 32fc638
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/transfer.c
Expand Up @@ -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
Expand Down

0 comments on commit 32fc638

Please sign in to comment.