aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-02-22 12:42:31 -0500
committerNick Mathewson <nickm@torproject.org>2010-02-22 12:42:31 -0500
commitd35b8dc5827762cd9cbee90f57ef370f477539fb (patch)
treed2159aa694d4fde110ae43b21ed1bd5e97fc32db /src/or
parent1dfbec482c50dabd2359d74848a13cbc03c4f9ea (diff)
downloadtor-d35b8dc5827762cd9cbee90f57ef370f477539fb.tar.gz
tor-d35b8dc5827762cd9cbee90f57ef370f477539fb.zip
Make expand_filename into a tor_strdup() alias on windows.
On Windows, we don't have a notion of ~ meaning "our homedir", so we were deliberately using an #ifdef to avoid calling expand_filename() in multiple places. This is silly: The right place to turn a function into a no-op on a single platform is in the function itself, not in every single call-site.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/config.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 0453904e81..5ad1d3f446 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3839,13 +3839,7 @@ find_torrc_filename(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")) {