summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2007-05-26 08:04:15 +0000
committerRoger Dingledine <arma@torproject.org>2007-05-26 08:04:15 +0000
commitc8fd65a936ccf0fcf09ba3eeef8a420015ff1861 (patch)
tree9f9e2b9343b486476e5053060369eb14d57ea25d
parent1c3f8640243ec1958477990078d0b79d90a055d5 (diff)
downloadtor-c8fd65a936ccf0fcf09ba3eeef8a420015ff1861.tar.gz
tor-c8fd65a936ccf0fcf09ba3eeef8a420015ff1861.zip
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
-rw-r--r--ChangeLog2
-rw-r--r--src/or/config.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c37a1be304..f8047f3026 100644
--- a/ChangeLog
+++ b/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.
diff --git a/src/or/config.c b/src/or/config.c
index b7f4dd3f3f..961d6887ef 100644
--- a/src/or/config.c
+++ b/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")) {