Loading lib/ftp.c +4 −2 Original line number Original line Diff line number Diff line Loading @@ -1509,11 +1509,13 @@ CURLcode ftp_perform(struct connectdata *conn) if(conn->resume_from < 0 ) { if(conn->resume_from < 0 ) { /* we could've got a specified offset from the command line, /* we could've got a specified offset from the command line, but now we know we didn't */ but now we know we didn't */ ssize_t gottensize; if(CURLE_OK != ftp_getsize(conn, ftp->file, &conn->resume_from)) { if(CURLE_OK != ftp_getsize(conn, ftp->file, &gottensize)) { failf(data, "Couldn't get remote file size"); failf(data, "Couldn't get remote file size"); return CURLE_FTP_COULDNT_GET_SIZE; return CURLE_FTP_COULDNT_GET_SIZE; } } conn->resume_from = gottensize; } } if(conn->resume_from) { if(conn->resume_from) { Loading Loading @@ -1680,7 +1682,7 @@ CURLcode ftp_perform(struct connectdata *conn) * We start with trying to use the SIZE command to figure out the size * We start with trying to use the SIZE command to figure out the size * of the file we're gonna get. If we can get the size, this is by far * of the file we're gonna get. If we can get the size, this is by far * the best way to know if we're trying to resume beyond the EOF. */ * the best way to know if we're trying to resume beyond the EOF. */ int foundsize=-1; ssize_t foundsize; result = ftp_getsize(conn, ftp->file, &foundsize); result = ftp_getsize(conn, ftp->file, &foundsize); Loading Loading
lib/ftp.c +4 −2 Original line number Original line Diff line number Diff line Loading @@ -1509,11 +1509,13 @@ CURLcode ftp_perform(struct connectdata *conn) if(conn->resume_from < 0 ) { if(conn->resume_from < 0 ) { /* we could've got a specified offset from the command line, /* we could've got a specified offset from the command line, but now we know we didn't */ but now we know we didn't */ ssize_t gottensize; if(CURLE_OK != ftp_getsize(conn, ftp->file, &conn->resume_from)) { if(CURLE_OK != ftp_getsize(conn, ftp->file, &gottensize)) { failf(data, "Couldn't get remote file size"); failf(data, "Couldn't get remote file size"); return CURLE_FTP_COULDNT_GET_SIZE; return CURLE_FTP_COULDNT_GET_SIZE; } } conn->resume_from = gottensize; } } if(conn->resume_from) { if(conn->resume_from) { Loading Loading @@ -1680,7 +1682,7 @@ CURLcode ftp_perform(struct connectdata *conn) * We start with trying to use the SIZE command to figure out the size * We start with trying to use the SIZE command to figure out the size * of the file we're gonna get. If we can get the size, this is by far * of the file we're gonna get. If we can get the size, this is by far * the best way to know if we're trying to resume beyond the EOF. */ * the best way to know if we're trying to resume beyond the EOF. */ int foundsize=-1; ssize_t foundsize; result = ftp_getsize(conn, ftp->file, &foundsize); result = ftp_getsize(conn, ftp->file, &foundsize); Loading