aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPatrick Monnerat <Patrick.Monnerat@datasphere.ch>2009-02-18 11:40:16 +0000
committerPatrick Monnerat <Patrick.Monnerat@datasphere.ch>2009-02-18 11:40:16 +0000
commit6e422c447a814cc6b5fa71d89f5440b03b8cccdd (patch)
tree5a0f959401b16873febca57659adc82f4e23ddfe /lib
parent4608d0157ee890a669aa2e88b81023d8bb7347e7 (diff)
FTP downloads (i.e.: RETR) ending with code 550 now return error CURLE_REMOTE_FILE_NOT_FOUND instead of CURLE_FTP_COULDNT_RETR_FILE.
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 08a55a0a4..cf2d4db6a 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 */