summaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 9fadac513..d4ecf9a96 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -2092,7 +2092,7 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn,
break;
case 550: /* "No such file or directory" */
failf(data, "Given file does not exist");
- result = CURLE_FTP_COULDNT_RETR_FILE;
+ result = CURLE_REMOTE_FILE_NOT_FOUND;
break;
}
@@ -2272,6 +2272,10 @@ static CURLcode ftp_state_size_resp(struct connectdata *conn,
(void)curlx_strtoofft(fdigit, NULL, 0, &filesize);
}
+ else if(ftpcode == 550) { /* "No such file or directory" */
+ failf(data, "The file does not exist");
+ return CURLE_REMOTE_FILE_NOT_FOUND;
+ }
if(instate == FTP_SIZE) {
#ifdef CURL_FTP_HTTPSTYLE_HEAD