]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
transfer: only reset the FTP wildcard engine in CLEAR state
authorDaniel Stenberg <daniel@haxx.se>
Thu, 19 Oct 2023 11:10:38 +0000 (13:10 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 19 Oct 2023 14:58:31 +0000 (16:58 +0200)
To avoid the state machine to start over and redownload all the files
*again*.

Reported-by: lkordos on github
Regression from 843b3baa3e3cb228 (shipped in 8.1.0)
Bisect-by: Dan Fandrich
Fixes #11775
Closes #12156

lib/transfer.c

index 6886764f44a96b92a1da9ece65af3cf660cae3c5..140757260358ecbe07a983d141efcc217950ca27 100644 (file)
@@ -1430,8 +1430,7 @@ CURLcode Curl_pretransfer(struct Curl_easy *data)
           return CURLE_OUT_OF_MEMORY;
       }
       wc = data->wildcard;
-      if((wc->state < CURLWC_INIT) ||
-         (wc->state >= CURLWC_CLEAN)) {
+      if(wc->state < CURLWC_INIT) {
         if(wc->ftpwc)
           wc->dtor(wc->ftpwc);
         Curl_safefree(wc->pattern);