summary refs log tree commit diff stats
path: root/src/common/plugin.c
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2013-05-04 18:21:48 +0200
committerBerke Viktor <bviktor@hexchat.org>2013-05-04 18:21:48 +0200
commitfb01d4e9ab9739e11499538d85e8932fb97a2c57 (patch)
tree46d0d3e258b2c7b929dce76ab43723e2b79b3c0a /src/common/plugin.c
parentb2317d88007270f8b49d3282face90a7f2716e7d (diff)
Replace g_strdup_printf with g_build_filename where possible
Diffstat (limited to 'src/common/plugin.c')
-rw-r--r--src/common/plugin.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/plugin.c b/src/common/plugin.c
index c9183ede..686f9749 100644
--- a/src/common/plugin.c
+++ b/src/common/plugin.c
@@ -477,7 +477,7 @@ plugin_auto_load (session *sess)
 	char *sub_dir;
 	ps = sess;
 
-	sub_dir = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "addons", get_xdir ());
+	sub_dir = g_build_filename (get_xdir (), "addons", NULL);
 
 #ifdef WIN32
 	/* a long list of bundled plugins that should be loaded automatically,
@@ -1670,9 +1670,9 @@ hexchat_pluginpref_set_str_real (hexchat_plugin *pl, const char *var, const char
 			g_free (buffer);
 			close (fhOut);
 
-			buffer = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s", get_xdir (), confname);
+			buffer = g_build_filename (get_xdir (), confname, NULL);
 			g_free (confname);
-			buffer_tmp = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s", get_xdir (), confname_tmp);
+			buffer_tmp = g_build_filename (get_xdir (), confname_tmp, NULL);
 			g_free (confname_tmp);
 
 #ifdef WIN32
@@ -1744,9 +1744,9 @@ hexchat_pluginpref_set_str_real (hexchat_plugin *pl, const char *var, const char
 
 		close (fhOut);
 
-		buffer = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s", get_xdir (), confname);
+		buffer = g_build_filename (get_xdir (), confname, NULL);
 		g_free (confname);
-		buffer_tmp = g_strdup_printf ("%s" G_DIR_SEPARATOR_S "%s", get_xdir (), confname_tmp);
+		buffer_tmp = g_build_filename (get_xdir (), confname_tmp, NULL);
 		g_free (confname_tmp);
 
 #ifdef WIN32