]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
ok ok the stat wasn't redundant
authorRoger Dingledine <arma@torproject.org>
Sun, 14 Nov 2004 13:35:39 +0000 (13:35 +0000)
committerRoger Dingledine <arma@torproject.org>
Sun, 14 Nov 2004 13:35:39 +0000 (13:35 +0000)
but the warn was

svn:r2852

src/or/routerlist.c

index 77160d78b8424791e5f3452bd41966f119d270b7..a7fa3e0669200d0fb5689dd5e0ec4578e0dd2c72 100644 (file)
@@ -47,11 +47,13 @@ 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);
+  stat(filename, &st); /* ignore return value; if s is true below, it worked */
   s = read_file_to_str(filename,0);
   if (s) {
     log_fn(LOG_INFO, "Loading cached directory from %s", filename);