Sfoglia il codice sorgente

If Tor is invoked from something that isn't a shell (e.g. Vidalia),
now we expand "-f ~/.tor/torrc" correctly. Suggested by Matt Edman.


svn:r10351

Roger Dingledine 17 anni fa
parent
commit
c8fd65a936
2 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 2 0
      ChangeLog
  2. 6 0
      src/or/config.c

+ 2 - 0
ChangeLog

@@ -112,6 +112,8 @@ Changes in version 0.2.0.1-alpha - 2007-??-??
       allows DNSPort to work sensibly with hidden service users.  By
       default, .exit and .onion addresses are remapped; the list of
       patterns can be reconfigured with AutomapHostsSuffixes.
+    - If Tor is invoked from something that isn't a shell (e.g. Vidalia),
+      now we expand "-f ~/.tor/torrc" correctly. Suggested by Matt Edman.
 
   o Removed features:
     - Removed support for the old binary "version 0" controller protocol.

+ 6 - 0
src/or/config.c

@@ -3184,7 +3184,13 @@ options_init_from_torrc(int argc, char **argv)
         log(LOG_WARN, LD_CONFIG, "Duplicate -f options on command line.");
         tor_free(fname);
       }
+#ifdef MS_WINDOWS
+      /* XXX one day we might want to extend expand_filename to work
+       * under Windows as well. */
       fname = tor_strdup(argv[i+1]);
+#else
+      fname = expand_filename(argv[i+1]);
+#endif
       using_default_torrc = 0;
       ++i;
     } else if (!strcmp(argv[i],"--ignore-missing-torrc")) {