--- tool_cfgable.h	Thu Apr 21 10:38:43 2016
+++ tool_cfgable.h.new	Thu Apr 21 12:01:00 2016
@@ -129,7 +129,7 @@
   bool insecure_ok;         /* set TRUE to allow insecure SSL connects */
   bool verifystatus;
   bool create_dirs;
-  bool ftp_create_dirs;
+  long ftp_create_dirs;     /* 0 = false, 1 = true, 2 = retry */
   bool ftp_skip_ip;
   bool proxynegotiate;
   bool proxyntlm;
--- tool_getparam.c	Thu Apr 21 10:38:43 2016
+++ tool_getparam.c.new	Thu Apr 21 23:03:35 2016
@@ -656,8 +656,18 @@
         dbug_init();
         break;
 #endif
-      case 'q': /* --ftp-create-dirs */
-        config->ftp_create_dirs = toggle;
+      case 'q': /* --ftp-create-dirs, 0 = false, 1 = true, 2 = retry */
+        if(!toggle) {
+          config->ftp_create_dirs = 0L;
+        } else if(curlx_strequal(nextarg, "-")) {
+            config->ftp_create_dirs = 1L;
+        } else {
+          err = str2num(&config->ftp_create_dirs, nextarg);
+          if(err)
+            return err;
+          if(config->ftp_create_dirs < 0 || config->ftp_create_dirs > 2)
+            return PARAM_BAD_NUMERIC;
+        }
         break;
 
       case 'r': /* --create-dirs */
--- tool_operate.c	Thu Apr 21 10:38:43 2016
+++ tool_operate.c.new	Thu Apr 21 23:12:02 2016
@@ -1181,8 +1181,9 @@
         }
 
         /* new in curl 7.10.7, extended in 7.19.4 but this only sets 0 or 1 */
+        /* extended in <version> to support 0 = false, 1 = true, 2 = retry */
         my_setopt(curl, CURLOPT_FTP_CREATE_MISSING_DIRS,
-                  config->ftp_create_dirs?1L:0L);
+                  config->ftp_create_dirs);
 
         /* new in curl 7.10.8 */
         if(config->max_filesize)
