urldata: make 'ftp_create_missing_dirs' depend on FTP || SFTP

Closes #10139
This commit is contained in:
Daniel Stenberg 2022-12-22 16:52:42 +01:00
parent 80efd3bc61
commit 31b9a32260
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 5 additions and 1 deletions

View File

@ -1309,6 +1309,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
data->set.krb = (data->set.str[STRING_KRB_LEVEL]) ? TRUE : FALSE;
break;
#endif
#if !defined(CURL_DISABLE_FTP) || !defined(USE_SSH)
case CURLOPT_FTP_CREATE_MISSING_DIRS:
/*
* An FTP/SFTP option that modifies an upload to create missing
@ -1322,6 +1323,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
else
data->set.ftp_create_missing_dirs = (unsigned char)arg;
break;
#endif
case CURLOPT_READDATA:
/*
* FILE pointer to read the file to be uploaded from. Or possibly

View File

@ -1732,11 +1732,13 @@ struct UserDefined {
unsigned char ftp_ccc; /* FTP CCC options: curl_ftpccc */
unsigned int accepttimeout; /* in milliseconds, 0 means no timeout */
#endif
/* Desppie the name ftp_create_missing_dirs is for FTP(S) and SFTP
#if !defined(CURL_DISABLE_FTP) || !defined(USE_SSH)
/* Despite the name, ftp_create_missing_dirs is for FTP(S) and SFTP
1 - create directories that don't exist
2 - the same but also allow MKD to fail once
*/
unsigned char ftp_create_missing_dirs;
#endif
#ifdef USE_LIBSSH2
curl_sshhostkeycallback ssh_hostkeyfunc; /* hostkey check callback */
void *ssh_hostkeyfunc_userp; /* custom pointer to callback */