diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2011-04-22 16:06:52 +0200 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2011-04-22 16:06:52 +0200 |
commit | 91aa6f08bcf0acbdfa038aaffe73e327ddd87c67 (patch) | |
tree | 735ed28a433537726945a6c877add20ea0e5163e /src/or | |
parent | 3f7f96d9e7aa2254d62d63530c37ee96d4b3abc8 (diff) | |
download | tor-91aa6f08bcf0acbdfa038aaffe73e327ddd87c67.tar.gz tor-91aa6f08bcf0acbdfa038aaffe73e327ddd87c67.zip |
Make the Log configuration option expand ~
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/config.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c index 5000f5d60e..3770301370 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -4382,11 +4382,13 @@ options_init_logs(or_options_t *options, int validate_only) if (smartlist_len(elts) == 2 && !strcasecmp(smartlist_get(elts,0), "file")) { if (!validate_only) { - if (add_file_log(severity, smartlist_get(elts, 1)) < 0) { + char *fname = expand_filename(smartlist_get(elts, 1)); + if (add_file_log(severity, fname) < 0) { log_warn(LD_CONFIG, "Couldn't open file for 'Log %s': %s", opt->value, strerror(errno)); ok = 0; } + tor_free(fname); } goto cleanup; } |