aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-node-db.c
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@src.gnome.org>2008-01-14 04:42:01 +0800
committerCosimo Cecchi <cosimoc@src.gnome.org>2008-01-14 04:42:01 +0800
commitaf1c2ceaef7d949e36a7680f463c5e25f79c43d6 (patch)
tree19c94f1df613831ed8ab92b4ac904be0c20c673f /lib/ephy-node-db.c
parent12d96e8a6fc9eddaffdbad58754e712af5fc5fef (diff)
downloadgsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.gz
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.bz2
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.lz
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.xz
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.tar.zst
gsoc2013-epiphany-af1c2ceaef7d949e36a7680f463c5e25f79c43d6.zip
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
Diffstat (limited to 'lib/ephy-node-db.c')
-rw-r--r--lib/ephy-node-db.c17
1 files changed, 11 insertions, 6 deletions
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;
}