mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
more _ftp_cwd
This commit is contained in:
parent
546f4dca52
commit
7d17713d62
13
lib/ftp.c
13
lib/ftp.c
@ -632,6 +632,8 @@ CURLcode _ftp_cwd(struct connectdata *conn, char *path)
|
|||||||
failf(conn->data, "Couldn't change back to directory %s", path);
|
failf(conn->data, "Couldn't change back to directory %s", path);
|
||||||
return CURLE_FTP_ACCESS_DENIED;
|
return CURLE_FTP_ACCESS_DENIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
@ -678,15 +680,8 @@ CURLcode _ftp(struct connectdata *conn)
|
|||||||
|
|
||||||
/* change directory first! */
|
/* change directory first! */
|
||||||
if(ftp->dir && ftp->dir[0]) {
|
if(ftp->dir && ftp->dir[0]) {
|
||||||
ftpsendf(conn->firstsocket, conn, "CWD %s", ftp->dir);
|
if ((result = _ftp_cwd(conn, ftp->dir)) != CURLE_OK)
|
||||||
nread = Curl_GetFTPResponse(conn->firstsocket, buf, conn, &ftpcode);
|
return result;
|
||||||
if(nread < 0)
|
|
||||||
return CURLE_OPERATION_TIMEOUTED;
|
|
||||||
|
|
||||||
if(ftpcode != 250) {
|
|
||||||
failf(data, "Couldn't change to directory %s", ftp->dir);
|
|
||||||
return CURLE_FTP_ACCESS_DENIED;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data->bits.get_filetime && ftp->file) {
|
if(data->bits.get_filetime && ftp->file) {
|
||||||
|
Loading…
Reference in New Issue
Block a user