--- a/finch/libfinch.c Wed Oct 09 01:58:19 2019 +0000
+++ b/finch/libfinch.c Wed Oct 09 02:02:56 2019 +0000
@@ -231,7 +231,7 @@
- path = g_build_filename(purple_user_dir(), "plugins", NULL);
+ path = g_build_filename(purple_data_dir(), "plugins", NULL); if (g_mkdir(path, S_IRUSR | S_IWUSR | S_IXUSR) != 0 && errno != EEXIST)
fprintf(stderr, "Couldn't create plugins dir\n");
purple_plugins_add_search_path(path);
--- a/pidgin/gtkprefs.c Wed Oct 09 01:58:19 2019 +0000
+++ b/pidgin/gtkprefs.c Wed Oct 09 02:02:56 2019 +0000
@@ -1245,9 +1245,9 @@
if ((is_smiley_theme = purple_strequal(info->type, "smiley")))
- destdir = g_build_filename(purple_user_dir(), "smileys", NULL);
+ destdir = g_build_filename(purple_data_dir(), "smileys", NULL); - destdir = g_build_filename(purple_user_dir(), "themes", "temp", NULL);
+ destdir = g_build_filename(purple_data_dir(), "themes", "temp", NULL); /* We'll check this just to make sure. This also lets us do something different on
* other platforms, if need be */
@@ -1292,17 +1292,17 @@
if (PURPLE_IS_THEME(theme)) {
/* create the location for the theme */
- gchar *theme_dest = g_build_filename(purple_user_dir(), "themes",
- purple_theme_get_name(theme),
- "purple", info->type, NULL);
+ gchar *theme_dest = g_build_filename(purple_data_dir(), "themes", + purple_theme_get_name(theme), + "purple", info->type, NULL); if (!g_file_test(theme_dest, G_FILE_TEST_IS_DIR))
purple_build_dir(theme_dest, S_IRUSR | S_IWUSR | S_IXUSR);
- theme_dest = g_build_filename(purple_user_dir(), "themes",
- purple_theme_get_name(theme),
- "purple", info->type, NULL);
+ theme_dest = g_build_filename(purple_data_dir(), "themes", + purple_theme_get_name(theme), + "purple", info->type, NULL); /* move the entire directory to new location */
if (g_rename(purple_theme_get_dir(theme), theme_dest)) {
@@ -1329,7 +1329,8 @@
} else { /* just a single file so copy it to a new temp directory and attempt to load it*/
gchar *temp_path, *temp_file;
- temp_path = g_build_filename(purple_user_dir(), "themes", "temp", "sub_folder", NULL);
+ temp_path = g_build_filename(purple_data_dir(), "themes", "temp", if (info->original_name != NULL) {
/* name was changed from the original (probably a dnd) change it back before loading */
@@ -1349,9 +1350,10 @@
theme = prefs_theme_find_theme(temp_path, info->type);
if (PURPLE_IS_THEME(theme)) {
- gchar *theme_dest = g_build_filename(purple_user_dir(), "themes",
- purple_theme_get_name(theme),
- "purple", info->type, NULL);
+ g_build_filename(purple_data_dir(), "themes", + purple_theme_get_name(theme), "purple", if(!g_file_test(theme_dest, G_FILE_TEST_IS_DIR))
purple_build_dir(theme_dest, S_IRUSR | S_IWUSR | S_IXUSR);
--- a/pidgin/gtksmiley-theme.c Wed Oct 09 01:58:19 2019 +0000
+++ b/pidgin/gtksmiley-theme.c Wed Oct 09 02:02:56 2019 +0000
@@ -555,8 +555,8 @@
probe_dirs = g_new0(gchar*, 3);
probe_dirs[0] = g_build_filename(
PURPLE_DATADIR, "pixmaps", "pidgin", "emotes", NULL);
- user_smileys_dir = probe_dirs[1] = g_build_filename(
- purple_user_dir(), "smileys", NULL);
+ user_smileys_dir = probe_dirs[1] = + g_build_filename(purple_data_dir(), "smileys", NULL); if (!g_file_test(user_smileys_dir, G_FILE_TEST_IS_DIR)) {
if (g_mkdir(user_smileys_dir, S_IRUSR | S_IWUSR | S_IXUSR) == 0) {
--- a/pidgin/gtkutils.c Wed Oct 09 01:58:19 2019 +0000
+++ b/pidgin/gtkutils.c Wed Oct 09 02:02:56 2019 +0000
@@ -608,8 +608,7 @@
- filename = g_build_filename(purple_user_dir(), G_DIR_SEPARATOR_S,
+ filename = g_build_filename(purple_config_dir(), "accels", NULL); purple_debug(PURPLE_DEBUG_MISC, "accels", "saving accels to %s\n", filename);
gtk_accel_map_save(filename);
@@ -623,8 +622,7 @@
- filename = g_build_filename(purple_user_dir(), G_DIR_SEPARATOR_S,
+ filename = g_build_filename(purple_config_dir(), "accels", NULL); gtk_accel_map_load(filename);
--- a/pidgin/libpidgin.c Wed Oct 09 01:58:19 2019 +0000
+++ b/pidgin/libpidgin.c Wed Oct 09 02:02:56 2019 +0000
@@ -582,7 +582,7 @@
- search_path = g_build_filename(purple_user_dir(), "gtk-3.0.css", NULL);
+ search_path = g_build_filename(purple_config_dir(), "gtk-3.0.css", NULL); provider = gtk_css_provider_new();
gui_check = gtk_css_provider_load_from_path(provider, search_path, &error);
@@ -617,7 +617,7 @@
if (!g_getenv("PURPLE_PLUGINS_SKIP")) {
- search_path = g_build_filename(purple_user_dir(),
+ search_path = g_build_filename(purple_data_dir(), if (!g_stat(search_path, &st))
g_mkdir(search_path, S_IRUSR | S_IWUSR | S_IXUSR);
--- a/pidgin/plugins/cap/cap.c Wed Oct 09 01:58:19 2019 +0000
+++ b/pidgin/plugins/cap/cap.c Wed Oct 09 02:02:56 2019 +0000
@@ -571,7 +571,7 @@
- path = g_build_filename(purple_user_dir(), "cap.db", (gchar *)NULL);
+ path = g_build_filename(purple_data_dir(), "cap.db", (gchar *)NULL); /* make database connection here */
rc = sqlite3_open(path, &_db);
--- a/pidgin/plugins/spellchk.c Wed Oct 09 01:58:19 2019 +0000
+++ b/pidgin/plugins/spellchk.c Wed Oct 09 02:02:56 2019 +0000
@@ -1785,7 +1785,7 @@
gboolean complete = TRUE;
gboolean case_sensitive = FALSE;
- buf = g_build_filename(purple_user_dir(), "dict", NULL);
+ buf = g_build_filename(purple_config_dir(), "dict", NULL); if (!(g_file_get_contents(buf, &ibuf, &size, NULL) && ibuf)) {
ibuf = g_strdup(defaultconf);
size = strlen(defaultconf);
@@ -2080,7 +2080,7 @@
} while (gtk_tree_model_iter_next(GTK_TREE_MODEL(model), &iter));
- purple_util_write_data_to_file("dict", data->str, -1);
+ purple_util_write_data_to_config_file("dict", data->str, -1); g_string_free(data, TRUE);
--- a/pidgin/win32/gtkwin32dep.c Wed Oct 09 01:58:19 2019 +0000
+++ b/pidgin/win32/gtkwin32dep.c Wed Oct 09 02:02:56 2019 +0000
@@ -416,7 +416,7 @@
gchar *debug_dir, *locale_debug_dir;
- debug_dir = g_build_filename(purple_user_dir(), "pidgin.RPT", NULL);
+ debug_dir = g_build_filename(purple_cache_dir(), "pidgin.RPT", NULL); locale_debug_dir = g_locale_from_utf8(debug_dir, -1, NULL, NULL, NULL);
purple_debug_info("winpidgin", "Setting exchndl.dll LogFile to %s\n", debug_dir);