diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-04-27 21:24:58 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-04-27 21:24:58 +0000 |
commit | 78882e46429e05c2a258a5440f06644f588cc224 (patch) | |
tree | dd32b19b09da99335b70d589cafffbaf117474fd /src/homedir.c | |
parent | 8465a367a41dea71603984b6a6bc08e177ef8a8c (diff) | |
download | curl-78882e46429e05c2a258a5440f06644f588cc224.tar.gz |
Paul Moore made curl check for the .curlrc file (_curlrc on windows) on two
more places. First, CURL_HOME is a new environment variable that is used
instead of HOME if it is set, to point out where the default config file
lives. If there's no config file in the dir pointed out by one of the
environment variables, the Windows version will instead check the same
directory the executable curl is located in.
Diffstat (limited to 'src/homedir.c')
-rw-r--r-- | src/homedir.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/homedir.c b/src/homedir.c index 69fbc467c..694b9bc79 100644 --- a/src/homedir.c +++ b/src/homedir.c @@ -87,7 +87,13 @@ char *GetEnv(const char *variable, char do_expand) /* return the home directory of the current user as an allocated string */ char *homedir(void) { - char *home = GetEnv("HOME", FALSE); + char *home; + + home = GetEnv("CURL_HOME", FALSE); + if(home) + return home; + + home = GetEnv("HOME", FALSE); if(home) return home; |