From 2d32b8f0e954dac3267b2f8616a8a16c6d91dee9 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 28 Sep 2015 13:56:40 +0100 Subject: [PATCH] trivial: Include the filename in the error when fwupd.conf is not found This can happen if the user deletes it from /etc or is running inside a prefix shell, e.g. jhbuild. --- src/fu-util.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/fu-util.c b/src/fu-util.c index ecfac4a3b..a258768de 100644 --- a/src/fu-util.c +++ b/src/fu-util.c @@ -995,9 +995,9 @@ fu_util_verify_update (FuUtilPrivate *priv, gchar **values, GError **error) **/ static gboolean fu_util_refresh_internal (FuUtilPrivate *priv, - const gchar *data_fn, - const gchar *sig_fn, - GError **error) + const gchar *data_fn, + const gchar *sig_fn, + GError **error) { GVariant *body; gint fd; @@ -1152,8 +1152,10 @@ fu_util_download_metadata (FuUtilPrivate *priv, GError **error) /* read config file */ config = g_key_file_new (); config_fn = g_build_filename (SYSCONFDIR, "fwupd.conf", NULL); - if (!g_key_file_load_from_file (config, config_fn, G_KEY_FILE_NONE, error)) + if (!g_key_file_load_from_file (config, config_fn, G_KEY_FILE_NONE, error)) { + g_prefix_error (error, "Failed to load %s: ", config_fn); return FALSE; + } /* download the signature */ data_uri = g_key_file_get_string (config, "fwupd", "DownloadURI", error);