aboutsummaryrefslogtreecommitdiff
path: root/src/homedir.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/homedir.c')
-rw-r--r--src/homedir.c8
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;