[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] ok ok the stat wasn"t redundant



Update of /home2/or/cvsroot/tor/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/tor/src/or

Modified Files:
	routerlist.c 
Log Message:
ok ok the stat wasn't redundant
but the warn was


Index: routerlist.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/routerlist.c,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -d -r1.185 -r1.186
--- routerlist.c	14 Nov 2004 09:40:07 -0000	1.185
+++ routerlist.c	14 Nov 2004 13:35:39 -0000	1.186
@@ -47,11 +47,13 @@
 {
   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);