[tool_parsecfg]: fallback to UserProfile on Windows

This commit is contained in:
Max Bossing 2025-08-09 16:30:17 +02:00
parent f000878f03
commit 9eec5a4f04

View file

@ -209,7 +209,11 @@ int parseconfig(const char *filename)
/* expand tilde-characters to the users home directory */
if(param && param[0] == '~') {
#ifdef _WIN32
const char *home = curl_getenv("UserProfile");
#elif
const char *home = curl_getenv("HOME");
#endif
if(home) {
char *tparam = strdup(param + 1);
if(!tparam) {