]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
urldata: make 'ftp_create_missing_dirs' depend on FTP || SFTP
authorDaniel Stenberg <daniel@haxx.se>
Thu, 22 Dec 2022 15:52:42 +0000 (16:52 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 22 Dec 2022 22:04:47 +0000 (23:04 +0100)
Closes #10139

lib/setopt.c
lib/urldata.h

index 46b8a99f33fc92bb53ae6ddec3f88e2fbdf5a8f7..691ce395a31b191a25ab5208ebb57155399df48b 100644 (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
index 152226c4f0b2dbeb6064f2465dbfbbfef2b208fa..67ce1b1c23713709a31121fcb674045d4b2f3b66 100644 (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 */