From: Daniel Stenberg Date: Thu, 19 Oct 2023 11:10:38 +0000 (+0200) Subject: transfer: only reset the FTP wildcard engine in CLEAR state X-Git-Tag: curl-8_5_0~229 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df9aea22c25ee909faf92333cf8ad0af9c702934;p=thirdparty%2Fcurl.git transfer: only reset the FTP wildcard engine in CLEAR state 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 --- diff --git a/lib/transfer.c b/lib/transfer.c index 6886764f44..1407572603 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -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);