mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 15:10:48 +01:00
Reindent the body of get_data_directory()
I don't know why it wasn't indented properly, but we may as well fix it now.
This commit is contained in:
parent
192be00691
commit
6aeabd454e
1 changed files with 19 additions and 19 deletions
|
@ -7700,25 +7700,25 @@ get_data_directory(const char *val)
|
||||||
d = "~/.tor";
|
d = "~/.tor";
|
||||||
|
|
||||||
if (!strcmpstart(d, "~/")) {
|
if (!strcmpstart(d, "~/")) {
|
||||||
char *fn = expand_filename(d);
|
char *fn = expand_filename(d);
|
||||||
if (!fn) {
|
if (!fn) {
|
||||||
log_warn(LD_CONFIG,"Failed to expand filename \"%s\".", d);
|
log_warn(LD_CONFIG,"Failed to expand filename \"%s\".", d);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (!val && !strcmp(fn,"/.tor")) {
|
if (!val && !strcmp(fn,"/.tor")) {
|
||||||
/* If our homedir is /, we probably don't want to use it. */
|
/* If our homedir is /, we probably don't want to use it. */
|
||||||
/* Default to LOCALSTATEDIR/tor which is probably closer to what we
|
/* Default to LOCALSTATEDIR/tor which is probably closer to what we
|
||||||
* want. */
|
* want. */
|
||||||
log_warn(LD_CONFIG,
|
log_warn(LD_CONFIG,
|
||||||
"Default DataDirectory is \"~/.tor\". This expands to "
|
"Default DataDirectory is \"~/.tor\". This expands to "
|
||||||
"\"%s\", which is probably not what you want. Using "
|
"\"%s\", which is probably not what you want. Using "
|
||||||
"\"%s"PATH_SEPARATOR"tor\" instead", fn, LOCALSTATEDIR);
|
"\"%s"PATH_SEPARATOR"tor\" instead", fn, LOCALSTATEDIR);
|
||||||
tor_free(fn);
|
tor_free(fn);
|
||||||
fn = tor_strdup(LOCALSTATEDIR PATH_SEPARATOR "tor");
|
fn = tor_strdup(LOCALSTATEDIR PATH_SEPARATOR "tor");
|
||||||
}
|
}
|
||||||
return fn;
|
return fn;
|
||||||
}
|
}
|
||||||
return tor_strdup(d);
|
return tor_strdup(d);
|
||||||
#endif /* defined(_WIN32) */
|
#endif /* defined(_WIN32) */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue