From: Kevin Sun Date: Fri, 13 Dec 2024 01:35:12 +0000 (-0800) Subject: netrc: restore _netrc fallback logic X-Git-Tag: curl-8_12_0~361 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0439499170b4e5ad4d4b4679ad284b4aa4df16f1;p=thirdparty%2Fcurl.git netrc: restore _netrc fallback logic Regression from 05977f4f75fd08837a877, shipped in 8.11.0 Fixes #15734 Closes #15735 --- diff --git a/lib/netrc.c b/lib/netrc.c index d5ee3c0fd5..056ea96a7c 100644 --- a/lib/netrc.c +++ b/lib/netrc.c @@ -390,7 +390,7 @@ int Curl_parsenetrc(struct store_netrc *store, const char *host, retcode = parsenetrc(store, host, loginp, passwordp, filealloc); free(filealloc); #ifdef _WIN32 - if(retcode == NETRC_FILE_MISSING) { + if((retcode == NETRC_FILE_MISSING) || (retcode == NETRC_FAILED)) { /* fallback to the old-style "_netrc" file */ filealloc = aprintf("%s%s_netrc", home, DIR_CHAR); if(!filealloc) {