summaryrefslogtreecommitdiff
path: root/src/or/dirserv.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-11-09 07:05:53 +0000
committerRoger Dingledine <arma@torproject.org>2004-11-09 07:05:53 +0000
commit6521c2ce51b3b808dd8ef5c47dc9995acce149e5 (patch)
tree4957b0a02b4e397c146f9b2f4c462acf8fb02b54 /src/or/dirserv.c
parent48a0b6c476dee067685a66a955cdffc8a37ea9d3 (diff)
downloadtor-6521c2ce51b3b808dd8ef5c47dc9995acce149e5.tar.gz
tor-6521c2ce51b3b808dd8ef5c47dc9995acce149e5.zip
Stop using the wrong DataDirectory when we're validating.
Also validate/normalize the DataDirectory better. svn:r2732
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r--src/or/dirserv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c
index cfe0a46611..2e6508b056 100644
--- a/src/or/dirserv.c
+++ b/src/or/dirserv.c
@@ -711,8 +711,8 @@ void dirserv_set_cached_directory(const char *directory, time_t when)
log_fn(LOG_WARN,"Error compressing cached directory");
}
cached_directory_published = when;
- if(get_data_directory()) {
- tor_snprintf(filename,sizeof(filename),"%s/cached-directory", get_data_directory());
+ if(get_options()->DataDirectory) {
+ tor_snprintf(filename,sizeof(filename),"%s/cached-directory", get_options()->DataDirectory);
if(write_str_to_file(filename,cached_directory,0) < 0) {
log_fn(LOG_WARN, "Couldn't write cached directory to disk. Ignoring.");
}