Browse Source

we should exit(1) if $HOME doesn't exist and we needed it

svn:r2344
Roger Dingledine 21 years ago
parent
commit
a475ccf5b8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/or/config.c

+ 3 - 0
src/or/config.c

@@ -1044,6 +1044,9 @@ const char *get_data_directory(or_options_t *options) {
   }
   }
   if (d && strncmp(d,"~/",2)==0) {
   if (d && strncmp(d,"~/",2)==0) {
     char *fn = expand_filename(d);
     char *fn = expand_filename(d);
+    if(!fn) {
+      /* XXX complain and exit(1) here */
+    }
     tor_free(options->DataDirectory);
     tor_free(options->DataDirectory);
     options->DataDirectory = fn;
     options->DataDirectory = fn;
   }
   }