summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-01-15 23:07:11 +0000
committerNick Mathewson <nickm@torproject.org>2009-01-15 23:07:11 +0000
commit87124f54d0bb8489d4067f71a5bf350d9bdffac6 (patch)
tree4563f97e6354af5d743cd4bf3a5ac3dbcbec73c4 /src/or
parentba7d786ab2a85724057fc691dc0994dffd7f0e82 (diff)
downloadtor-87124f54d0bb8489d4067f71a5bf350d9bdffac6.tar.gz
tor-87124f54d0bb8489d4067f71a5bf350d9bdffac6.zip
This patch changes the default location where config and data files
are stored when the --enable-local-appdata option is configured. This changes the Windows path from %APPDATA% to a host local %USERPROFILE%\Local Settings\Application Data\ path (aka, LOCAL_APPDATA). Patch from coderman. svn:r18122
Diffstat (limited to 'src/or')
-rw-r--r--src/or/config.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 53fc5fb0bc..586245d353 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3735,8 +3735,12 @@ get_windows_conf_root(void)
/* Find X:\documents and settings\username\application data\ .
* We would use SHGetSpecialFolder path, but that wasn't added until IE4.
*/
- if (!SUCCEEDED(SHGetSpecialFolderLocation(NULL, CSIDL_APPDATA,
- &idl))) {
+#ifdef ENABLE_LOCAL_APPDATA
+#define APPDATA_PATH CSIDL_LOCAL_APPDATA
+#else
+#define APPDATA_PATH CSIDL_APPDATA
+#endif
+ if (!SUCCEEDED(SHGetSpecialFolderLocation(NULL, APPDATA_PATH, &idl))) {
GetCurrentDirectory(MAX_PATH, path);
is_set = 1;
log_warn(LD_CONFIG,