[gedit/wip/loader-saver] GeditDocument: ignore not found error for the query info
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/loader-saver] GeditDocument: ignore not found error for the query info
- Date: Sat, 28 Jun 2014 20:41:56 +0000 (UTC)
commit 09803ca55e6f2fc68bc47b3c04b6f2901512b675
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Jun 28 22:39:48 2014 +0200
GeditDocument: ignore not found error for the query info
gedit/gedit-document.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/gedit/gedit-document.c b/gedit/gedit-document.c
index 90510b3..94a08ce 100644
--- a/gedit/gedit-document.c
+++ b/gedit/gedit-document.c
@@ -1053,7 +1053,15 @@ loaded_query_info_cb (GFile *location,
if (error != NULL)
{
- g_warning ("Document loading: query info error: %s", error->message);
+ /* Ignore not found error as it can happen when opening a
+ * non-existent file from the command line.
+ */
+ if (error->domain != G_IO_ERROR ||
+ error->code != G_IO_ERROR_NOT_FOUND)
+ {
+ g_warning ("Document loading: query info error: %s", error->message);
+ }
+
g_error_free (error);
error = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]