diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ftp.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2188,6 +2188,10 @@ static CURLcode ftp_state_size_resp(struct connectdata *conn, curl_off_t filesize; char *buf = data->state.buffer; + if((instate != FTP_STOR_SIZE) && (ftpcode == 550)) + /* the file doesn't exist and we're not about to upload */ + return CURLE_REMOTE_FILE_NOT_FOUND; + /* get the size from the ascii string: */ filesize = (ftpcode == 213)?curlx_strtoofft(buf+4, NULL, 0):-1; @@ -3165,6 +3169,7 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status, case CURLE_UPLOAD_FAILED: case CURLE_REMOTE_ACCESS_DENIED: case CURLE_FILESIZE_EXCEEDED: + case CURLE_REMOTE_FILE_NOT_FOUND: /* the connection stays alive fine even though this happened */ /* fall-through */ case CURLE_OK: /* doesn't affect the control connection's status */ |