Use CSIDL_LOCAL_APPDATA on Windows
authorTor Lillqvist <tml@iki.fi>
Thu, 14 Oct 2010 19:47:25 +0000 (22:47 +0300)
committerTor Lillqvist <tml@iki.fi>
Mon, 18 Oct 2010 11:43:21 +0000 (14:43 +0300)
commit9d80c361418f94c609840ec9f83741aede7e482c
tree34eea11ada16005a92dc7564bf79454bb9acd878
parent9040eac4ebfbe14141d6501f44a501bfe5e61b9c
Use CSIDL_LOCAL_APPDATA on Windows

Make g_get_user_data_dir() return the CSIDL_LOCAL_APPDATA folder on
Windows, and not CSIDL_PERSONAL. On Windows 7, that corresponds to the
subfolders AppData\Local vs. Documents under the profile ("home")
folder. This matches what Qt does, for instance, and has been widely
requested.

Also make g_get_user_config_dir() return this and not the (roaming)
CSIDL_APPDATA folder. The reason for this change is that it would be
surprising and hard to justify if g_get_user_data_dir() returned the
local application data folder while g_get_user_config_dir() would
return the roaming one. Nothing in the function names or the XDG specs
suggests that any roaming vs. local dichotomy would be involved.

Document the new semantics and the fact that these two functions now
return the same directory on Windows.

Note that in reality, code that really truly wants to support Windows
as well as possible probably will not use these GLib functions anyway,
but Win32 APIs directly to be sure what it is doing...

Should hopefully satisfy complaints in bug #620710 and related bugs.
glib/gutils.c