]> spindle.queued.net Git - midori/commitdiff
Show error on failure to read global config file
authorChristian Dywan <christian@twotoasts.de>
Sun, 13 Feb 2011 16:53:25 +0000 (17:53 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sun, 13 Feb 2011 17:35:47 +0000 (18:35 +0100)
midori/main.c

index 43447568f4f572e0386417af4af626d284f468aa..2bea2c0473cf398a4abcf7ae2075c9f128b3702d 100644 (file)
@@ -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"),