libpurple/win32/win32dep.c

branch
soc.2013.gobjectification.plugins
changeset 37136
cfa7c57f9ca5
parent 35850
1abeda205d6c
child 35864
a9dfa29e3382
--- a/libpurple/win32/win32dep.c	Tue Apr 15 20:01:46 2014 +0530
+++ b/libpurple/win32/win32dep.c	Wed Apr 16 12:04:51 2014 +0530
@@ -34,7 +34,7 @@
  * LOCALS
  */
 static char *app_data_dir = NULL, *install_dir = NULL,
-	*lib_dir = NULL, *locale_dir = NULL;
+	*lib_dir = NULL, *locale_dir = NULL, *sysconf_dir = NULL;
 
 static HINSTANCE libpurpledll_hInstance = NULL;
 
@@ -208,6 +208,18 @@
 	return app_data_dir;
 }
 
+const char *wpurple_sysconf_dir(void)
+{
+	static gboolean initialized = FALSE;
+
+	if (!initialized) {
+		sysconf_dir = wpurple_get_special_folder(CSIDL_COMMON_APPDATA);
+		initialized = TRUE;
+	}
+
+	return sysconf_dir;
+}
+
 /* Miscellaneous */
 
 gboolean wpurple_write_reg_string(HKEY rootkey, const char *subkey, const char *valname,
@@ -532,11 +544,13 @@
 	g_free(install_dir);
 	g_free(lib_dir);
 	g_free(locale_dir);
+	g_free(sysconf_dir);
 
 	app_data_dir = NULL;
 	install_dir = NULL;
 	lib_dir = NULL;
 	locale_dir = NULL;
+	sysconf_dir = NULL;
 
 	libpurpledll_hInstance = NULL;
 }

mercurial