From 75a1d90233ed7084c1bc0a69f33339729484915b Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 13 Feb 2011 17:53:25 +0100 Subject: [PATCH] Show error on failure to read global config file --- midori/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/midori/main.c b/midori/main.c index 43447568..2bea2c04 100644 --- a/midori/main.c +++ b/midori/main.c @@ -86,9 +86,16 @@ settings_and_accels_new (const gchar* config, { if (error->code == G_FILE_ERROR_NOENT) { + GError* inner_error = NULL; katze_assign (config_file, sokoke_find_config_filename (NULL, "config")); g_key_file_load_from_file (key_file, config_file, - G_KEY_FILE_KEEP_COMMENTS, NULL); + G_KEY_FILE_KEEP_COMMENTS, &inner_error); + if (inner_error != NULL) + { + printf (_("The configuration couldn't be loaded: %s\n"), + inner_error->message); + g_error_free (inner_error); + } } else printf (_("The configuration couldn't be loaded: %s\n"), -- 2.39.5