[epiphany] Fix gvdb_table_write_contents_async()
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Fix gvdb_table_write_contents_async()
- Date: Thu, 27 Jun 2019 21:53:36 +0000 (UTC)
commit de54f9b1ad9784b07150eeffa125193d583b3b1c
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Thu Jun 27 16:51:57 2019 -0500
Fix gvdb_table_write_contents_async()
It's always deleting the bookmarks file because str has already been
freed. This worked when I first wrote the code, but I broke it during
late stages of code review. Oops.
Fixes #837
lib/contrib/gvdb/gvdb-builder.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/lib/contrib/gvdb/gvdb-builder.c b/lib/contrib/gvdb/gvdb-builder.c
index 70c0ac1cf..86377da91 100644
--- a/lib/contrib/gvdb/gvdb-builder.c
+++ b/lib/contrib/gvdb/gvdb-builder.c
@@ -602,7 +602,9 @@ gvdb_table_write_contents_async (GHashTable *table,
g_task_set_task_data (task, data, (GDestroyNotify)write_contents_data_free);
g_task_set_source_tag (task, gvdb_table_write_contents_async);
- g_file_replace_contents_async (file, str->str, str->len,
+ g_file_replace_contents_async (file,
+ g_bytes_get_data (bytes, NULL),
+ g_bytes_get_size (bytes),
NULL, FALSE,
G_FILE_CREATE_PRIVATE | G_FILE_CREATE_REPLACE_DESTINATION,
cancellable, replace_contents_cb, g_steal_pointer (&task));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]