diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-03-09 21:39:30 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-03-09 21:39:30 +0000 |
commit | 02ce8e6b12d023d9097a754c91e45a928dc9f4e4 (patch) | |
tree | 9d6b529b5c68a49777b9014a0ef60420a3d2249d /src/or/config.c | |
parent | d62e37b4a9200c35f44176b6e3fd159f9d7d1ea2 (diff) | |
download | tor-02ce8e6b12d023d9097a754c91e45a928dc9f4e4.tar tor-02ce8e6b12d023d9097a754c91e45a928dc9f4e4.tar.gz |
r12474@Kushana: nickm | 2007-03-06 16:10:05 -0500
We have a PATH_SEPARATOR macro. How about we use it?
svn:r9782
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/or/config.c b/src/or/config.c index 47a2786b6..658e26aca 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -907,7 +907,8 @@ options_act(or_options_t *old_options) if (running_tor) { len = strlen(options->DataDirectory)+32; fn = tor_malloc(len); - tor_snprintf(fn, len, "%s/cached-status", options->DataDirectory); + tor_snprintf(fn, len, "%s"PATH_SEPARATOR"cached-status", + options->DataDirectory); if (check_private_dir(fn, CPD_CREATE) != 0) { log_err(LD_CONFIG, "Couldn't access/create private data directory \"%s\"", fn); @@ -3516,11 +3517,10 @@ normalize_data_directory(or_options_t *options) * want. */ log_warn(LD_CONFIG, "Default DataDirectory is \"~/.tor\". This expands to " - "\"%s\", which is probably not what you want. Using \"%s/tor\" " - "instead", fn, LOCALSTATEDIR); + "\"%s\", which is probably not what you want. Using " + "\"%s"PATH_SEPARATOR"tor\" instead", fn, LOCALSTATEDIR); tor_free(fn); - fn = tor_strdup(LOCALSTATEDIR"/tor"); - + fn = tor_strdup(LOCALSTATEDIR PATH_SEPARATOR "tor"); } tor_free(options->DataDirectory); options->DataDirectory = fn; @@ -3933,7 +3933,7 @@ get_or_state_fname(void) or_options_t *options = get_options(); size_t len = strlen(options->DataDirectory) + 16; fname = tor_malloc(len); - tor_snprintf(fname, len, "%s/state", options->DataDirectory); + tor_snprintf(fname, len, "%s"PATH_SEPARATOR"state", options->DataDirectory); return fname; } |