summaryrefslogtreecommitdiff
path: root/src/dkp-history.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2008-08-29 12:59:04 +0100
committerRichard Hughes <richard@hughsie.com>2008-08-29 12:59:04 +0100
commit0b38c52b4f10d5f04c8e1893b334a118ab32d2f2 (patch)
treea42d8b846db1e3297bc5303a3ea02500a469d512 /src/dkp-history.c
parent9ef076ef694409ae19eef1880ee37c23e9cc7c8a (diff)
trivial: don't use GIO functionality just yet
Diffstat (limited to 'src/dkp-history.c')
-rw-r--r--src/dkp-history.c7
1 files changed, 1 insertions, 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;
}