diff options
author | Roger Dingledine <arma@torproject.org> | 2004-07-22 00:13:42 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-07-22 00:13:42 +0000 |
commit | 6c56f34aaf43bd25ebb77d66169b29681442d9b6 (patch) | |
tree | 002d8d4d449907e8dcfaec11d64ec4d348d77c99 /src/or/dirserv.c | |
parent | 3c2c8ed42bdcc26edebb73531e0d6a22ab2fff07 (diff) | |
download | tor-6c56f34aaf43bd25ebb77d66169b29681442d9b6.tar.gz tor-6c56f34aaf43bd25ebb77d66169b29681442d9b6.zip |
clients shouldn't create datadir until we have something to put there
svn:r2092
Diffstat (limited to 'src/or/dirserv.c')
-rw-r--r-- | src/or/dirserv.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index cbdfb6b0a7..5351c74931 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -673,9 +673,11 @@ size_t dirserv_get_directory(const char **directory) exit(0); } free(new_directory); - sprintf(filename,"%s/cached-directory", get_data_directory(&options)); - if(write_str_to_file(filename,the_directory) < 0) { - log_fn(LOG_WARN, "Couldn't write cached directory to disk. Ignoring."); + if(get_data_directory(&options)) { + sprintf(filename,"%s/cached-directory", get_data_directory(&options)); + if(write_str_to_file(filename,the_directory) < 0) { + log_fn(LOG_WARN, "Couldn't write cached directory to disk. Ignoring."); + } } } else { log(LOG_INFO,"Directory still clean, reusing."); |