diff options
author | Kamran Riaz Khan <krkhan@inspirated.com> | 2011-12-04 21:33:20 +0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-12-22 10:17:48 -0500 |
commit | a1c1fc72d17e0327093a63f20e56292cbac0cf39 (patch) | |
tree | 0b4915e8deed9c3fc68da1c77259158f53ebae3b /src/or/config.c | |
parent | 878a684386cd4f7570bbc221fdfccdf005611c34 (diff) | |
download | tor-a1c1fc72d17e0327093a63f20e56292cbac0cf39.tar.gz tor-a1c1fc72d17e0327093a63f20e56292cbac0cf39.zip |
Prepend cwd for relative config file paths.
Modifies filenames which do not start with '/' or '.' on non-Windows
platforms; uses _fullpath on Windows.
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index 521f760051..254e9fffd0 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -4356,6 +4356,14 @@ find_torrc_filename(int argc, char **argv, tor_free(fname); } fname = expand_filename(argv[i+1]); + + { + char *absfname; + absfname = make_path_absolute(fname); + tor_free(fname); + fname = absfname; + } + *using_default_torrc = 0; ++i; } else if (ignore_opt && !strcmp(argv[i],ignore_opt)) { |