[gnome-builder/wip/chergert/perspective] context: make back-forward-list load failure non-fatal
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/perspective] context: make back-forward-list load failure non-fatal
- Date: Sat, 5 Dec 2015 10:07:10 +0000 (UTC)
commit e3c5559e430d2ac75c3b5cdd5e6d66102d338166
Author: Christian Hergert <chergert redhat com>
Date: Sat Dec 5 02:06:04 2015 -0800
context: make back-forward-list load failure non-fatal
libide/ide-context.c | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
---
diff --git a/libide/ide-context.c b/libide/ide-context.c
index 1aef8b9..a5a9c97 100644
--- a/libide/ide-context.c
+++ b/libide/ide-context.c
@@ -1113,17 +1113,15 @@ ide_context__back_forward_list_load_cb (GObject *object,
g_assert (IDE_IS_BACK_FORWARD_LIST (back_forward_list));
g_assert (G_IS_TASK (task));
+ /*
+ * Failing to load the back-forward list is non-fatal. We'll fix it during
+ * our next write to the file.
+ */
if (!_ide_back_forward_list_load_finish (back_forward_list, result, &error))
{
- if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
- {
- g_clear_error (&error);
- }
- else
- {
- g_task_return_error (task, error);
- return;
- }
+ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
+ g_warning ("%s", error->message);
+ g_clear_error (&error);
}
g_task_return_boolean (task, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]