aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-09-26 23:36:25 +0200
committerDaniel Stenberg <daniel@haxx.se>2015-09-26 23:36:25 +0200
commit32fc638ddf046d501abc2a58c91c3e934caf303a (patch)
tree4ebdb0bf11331e18ce7cb3cc0a97ac9ae8b4be48
parent119037325de02579f5c58256ca2ed2a0aa592c86 (diff)
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
-rw-r--r--lib/transfer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 718139b32..191523c8b 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -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