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
This commit is contained in:
Nick Mathewson
2009-01-15 23:07:11 +00:00
parent ba7d786ab2
commit 87124f54d0
3 changed files with 17 additions and 2 deletions
+6 -2
View File
@@ -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,