From 0b38c52b4f10d5f04c8e1893b334a118ab32d2f2 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 29 Aug 2008 12:59:04 +0100 Subject: trivial: don't use GIO functionality just yet --- src/dkp-history.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/dkp-history.c b/src/dkp-history.c index 3283421..a6921ab 100644 --- a/src/dkp-history.c +++ b/src/dkp-history.c @@ -221,7 +221,6 @@ dkp_history_save_data_array (const gchar *filename, EggObjList *array) /* save to disk */ file = g_file_new_for_path (filename); ret = g_file_set_contents (filename, part, -1, &error); -// ret = g_file_replace_contents (file, part, -1, NULL, TRUE, G_FILE_CREATE_NONE, NULL, NULL, &error); if (!ret) { egg_warning ("failed to set data: %s", error->message); g_error_free (error); @@ -353,7 +352,6 @@ static gboolean dkp_history_load_data_array (const gchar *filename, EggObjList *array) { gboolean ret; - GFile *file = NULL; GError *error = NULL; gchar *data = NULL; gchar **parts = NULL; @@ -369,8 +367,7 @@ dkp_history_load_data_array (const gchar *filename, EggObjList *array) } /* get contents */ - file = g_file_new_for_path (filename); - ret = g_file_load_contents (file, NULL, &data, NULL, NULL, &error); + ret = g_file_get_contents (filename, &data, NULL, &error); if (!ret) { egg_warning ("failed to get data: %s", error->message); g_error_free (error); @@ -397,8 +394,6 @@ dkp_history_load_data_array (const gchar *filename, EggObjList *array) out: g_strfreev (parts); g_free (data); - if (file != NULL) - g_object_unref (file); return ret; } -- cgit v1.2.1