netrc: check %USERPROFILE% as well on Windows

Closes #8855
This commit is contained in:
Wolf Vollprecht 2022-06-02 09:30:52 +02:00 committed by Daniel Stenberg
parent 665138b2dd
commit 4d4eb8e587
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 23 additions and 6 deletions

View file

@ -313,6 +313,13 @@ int Curl_parsenetrc(const char *host,
if(pw) {
home = pw->pw_dir;
}
#elif defined(_WIN32)
}
else {
homea = curl_getenv("USERPROFILE");
if(homea) {
home = homea;
}
#endif
}