mirror of
https://github.com/curl/curl.git
synced 2026-06-09 02:54:14 +03:00
[tool_parsecfg]: fallback to UserProfile on Windows
This commit is contained in:
parent
f000878f03
commit
9eec5a4f04
1 changed files with 4 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue