diff gtk/plugins/cap/cap.c @ 14517:1444d83ff10a

[gaim-migrate @ 17237] 4th times a charm. Use g_build_filename (thanks rlaager). committer: Tailor Script <tailor@pidgin.im>
author Geoff Foster <g-off_>
date Mon, 11 Sep 2006 01:52:12 +0000
parents 3c8b4bcb68fb
children 5e5b34ac509a
line wrap: on
line diff
--- a/gtk/plugins/cap/cap.c	Mon Sep 11 01:39:25 2006 +0000
+++ b/gtk/plugins/cap/cap.c	Mon Sep 11 01:52:12 2006 +0000
@@ -563,20 +563,18 @@
 }
 
 static gboolean create_database_connection() {
-	GString *path;
+	gchar *path;
 	int rc;
 
 	if(_db)
 		return TRUE;
 
 	/* build the path */
-	path = g_string_new(gaim_user_dir());
-	g_string_append(path, G_DIR_SEPARATOR_S);
-	g_string_append(path, "cap.db");
+	path = g_build_filename(gaim_user_dir(), "cap.db", (gchar *)NULL);
 
 	/* make database connection here */
-	rc = sqlite3_open(path->str, &_db);
-	g_string_free(path, TRUE);
+	rc = sqlite3_open(path, &_db);
+	g_free(path);
 	if(rc != SQLITE_OK)
 		return FALSE;