tool: fix --capath when proxy support is disabled

After 95e8515ca0, --capath always sets CURLOPT_PROXY_CAPATH, which fails
with CURLE_UNKNOWN_OPTION when proxy support is disabled.

Closes #12089
This commit is contained in:
Loïc Yhuel 2023-10-11 13:09:23 +02:00 committed by Daniel Stenberg
parent 526779a7ee
commit 014ce7c0d0
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1776,7 +1776,8 @@ static CURLcode single_transfer(struct GlobalConfig *global,
(config->proxy_capath ?
config->proxy_capath :
config->capath));
if(result == CURLE_NOT_BUILT_IN) {
if((result == CURLE_NOT_BUILT_IN) ||
(result == CURLE_UNKNOWN_OPTION)) {
if(config->proxy_capath) {
warnf(global,
"ignoring --proxy-capath, not supported by libcurl");