mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
Remove redundant stat() for reading cached directory, and remove
confusing warn when the cached directory isn't there yet. svn:r2847
This commit is contained in:
parent
affcda71c6
commit
4564367b2a
@ -47,17 +47,11 @@ int router_reload_router_list(void)
|
||||
{
|
||||
char filename[512];
|
||||
int is_recent;
|
||||
struct stat st;
|
||||
char *s;
|
||||
tor_assert(get_options()->DataDirectory);
|
||||
|
||||
tor_snprintf(filename,sizeof(filename),"%s/cached-directory",
|
||||
get_options()->DataDirectory);
|
||||
if (stat(filename, &st)) {
|
||||
log_fn(LOG_WARN, "Unable to check status for '%s': %s", filename,
|
||||
strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
s = read_file_to_str(filename,0);
|
||||
if (s) {
|
||||
log_fn(LOG_INFO, "Loading cached directory from %s", filename);
|
||||
|
Loading…
Reference in New Issue
Block a user