From af1c2ceaef7d949e36a7680f463c5e25f79c43d6 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Sun, 13 Jan 2008 20:42:01 +0000 Subject: Drop gnome-vfs dependency. Now Epiphany depends on glib >= 2.15.1. Also, optional Zeroconf support depends on Avahi >= 0.6.22. Bug #507152. svn path=/trunk/; revision=7858 --- lib/ephy-node-db.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'lib/ephy-node-db.c') diff --git a/lib/ephy-node-db.c b/lib/ephy-node-db.c index ebc3e20b5..15a4593ab 100644 --- a/lib/ephy-node-db.c +++ b/lib/ephy-node-db.c @@ -482,30 +482,35 @@ ephy_node_db_write_to_xml_safe (EphyNodeDb *db, { va_list argptr; int ret = 0; - char *tmp_file; + GFile *tmp_file, *file; + char *tmp_file_path; - tmp_file = g_strconcat ((const gchar *)filename, ".tmp", NULL); + tmp_file_path = g_strconcat ((const gchar *) filename, ".tmp", NULL); + tmp_file = g_file_new_for_path (tmp_file_path); + file = g_file_new_for_path ((const char *) filename); va_start (argptr, node); ret = ephy_node_db_write_to_xml_valist - (db, (const xmlChar *)tmp_file, root, version, comment, node, argptr); + (db, (const xmlChar *)tmp_file_path, root, version, comment, node, argptr); va_end (argptr); if (ret < 0) { - g_warning ("Failed to write XML data to %s", tmp_file); + g_warning ("Failed to write XML data to %s", tmp_file_path); goto failed; } - if (ephy_file_switch_temp_file ((const char *)filename, tmp_file) == FALSE) + if (ephy_file_switch_temp_file (file, tmp_file) == FALSE) { ret = -1; } failed: - g_free (tmp_file); + g_free (tmp_file_path); + g_object_unref (file); + g_object_unref (tmp_file); return ret; } -- cgit v1.2.3