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.
This commit is contained in:
Richard Hughes 2015-09-28 13:56:40 +01:00
parent 9b614b5017
commit 2d32b8f0e9

View File

@ -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);