Browse Source

This helps return a better error message when the file supplied to DirPortFrontPage is missing.

svn:r17502
Jacob Appelbaum 15 years ago
parent
commit
f70146ca91
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/or/config.c

+ 6 - 0
src/or/config.c

@@ -1428,6 +1428,12 @@ options_act(or_options_t *old_options)
   if (options->DirPortFrontPage) {
     global_dirfrontpagecontents =
       read_file_to_str(options->DirPortFrontPage, 0, NULL);
+    if (!global_dirfrontpagecontents)
+    {
+      log_warn(LD_CONFIG,
+               "DirPortFrontPage file '%s' not found. Continuing anyway.",
+               options->DirPortFrontPage);
+    }
   }
 
   return 0;