mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Treat unset $HOME like empty $HOME
This means Tor no longer dies when it doesn't have a $HOME.
This commit is contained in:
parent
faf51fa52a
commit
0882e1e839
3
changes/bug1522
Normal file
3
changes/bug1522
Normal file
@ -0,0 +1,3 @@
|
||||
o Minor bugfixes
|
||||
- Treat an unset $HOME like an empty $HOME. Fixes bug 1522; bugfix on
|
||||
tor-0.0.8pre1.
|
@ -2323,11 +2323,9 @@ expand_filename(const char *filename)
|
||||
|
||||
if (filename[1] == '/' || filename[1] == '\0') {
|
||||
home = getenv("HOME");
|
||||
if (!home) {
|
||||
log_warn(LD_CONFIG, "Couldn't find $HOME environment variable while "
|
||||
"expanding \"%s\"", filename);
|
||||
return NULL;
|
||||
}
|
||||
if (!home)
|
||||
home = tor_strdup("");
|
||||
else
|
||||
home = tor_strdup(home);
|
||||
rest = strlen(filename)>=2?(filename+2):"";
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user