summaryrefslogtreecommitdiff
path: root/service/dconf-gvdb-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'service/dconf-gvdb-utils.c')
-rw-r--r--service/dconf-gvdb-utils.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/service/dconf-gvdb-utils.c b/service/dconf-gvdb-utils.c
index 79291d3..9e0c4b1 100644
--- a/service/dconf-gvdb-utils.c
+++ b/service/dconf-gvdb-utils.c
@@ -33,9 +33,18 @@ dconf_gvdb_utils_read_file (const gchar *filename,
{
DConfChangeset *database;
GError *my_error = NULL;
- GvdbTable *table;
+ GvdbTable *table = NULL;
+ gchar *contents;
+ gsize size;
- table = gvdb_table_new (filename, FALSE, &my_error);
+ if (g_file_get_contents (filename, &contents, &size, &my_error))
+ {
+ GBytes *bytes;
+
+ bytes = g_bytes_new_take (contents, size);
+ table = gvdb_table_new_from_bytes (bytes, FALSE, &my_error);
+ g_bytes_unref (bytes);
+ }
/* It is perfectly fine if the file does not exist -- then it's
* just empty.