From 9eec5a4f0412ca3570e1f4fababd4290c5a6d59f Mon Sep 17 00:00:00 2001 From: Max Bossing Date: Sat, 9 Aug 2025 16:30:17 +0200 Subject: [PATCH] [tool_parsecfg]: fallback to UserProfile on Windows --- src/tool_parsecfg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c index 1afc2484ce..011f37d93c 100644 --- a/src/tool_parsecfg.c +++ b/src/tool_parsecfg.c @@ -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) {