From: Patrick Monnerat Date: Wed, 18 Feb 2009 11:40:16 +0000 (+0000) Subject: FTP downloads (i.e.: RETR) ending with code 550 now return error CURLE_REMOTE_FILE_NO... X-Git-Tag: curl-7_19_4~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e422c447a814cc6b5fa71d89f5440b03b8cccdd;p=thirdparty%2Fcurl.git FTP downloads (i.e.: RETR) ending with code 550 now return error CURLE_REMOTE_FILE_NOT_FOUND instead of CURLE_FTP_COULDNT_RETR_FILE. --- diff --git a/CHANGES b/CHANGES index f2c521ef07..6df1e738f4 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,10 @@ Changelog +Patrick Monnerat (18 Feb 2009) +- FTP downloads (i.e.: RETR) ending with code 550 now return error + CURLE_REMOTE_FILE_NOT_FOUND instead of CURLE_FTP_COULDNT_RETR_FILE. + Daniel Stenberg (17 Feb 2009) - Kamil Dudka made NSS-powered builds compile and run again! diff --git a/lib/ftp.c b/lib/ftp.c index 08a55a0a49..cf2d4db6a5 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -2427,7 +2427,8 @@ static CURLcode ftp_state_get_resp(struct connectdata *conn, } else { failf(data, "RETR response: %03d", ftpcode); - return CURLE_FTP_COULDNT_RETR_FILE; + return instate == FTP_RETR && ftpcode == 550? CURLE_REMOTE_FILE_NOT_FOUND: + CURLE_FTP_COULDNT_RETR_FILE; } } @@ -3159,6 +3160,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 */