[gnome-software] Fall back to /etc/fwupd.conf if the SYSCONFDIR version does not exist
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] Fall back to /etc/fwupd.conf if the SYSCONFDIR version does not exist
- Date: Thu, 27 Aug 2015 19:49:40 +0000 (UTC)
commit 42cc6d5c0290cb49a75c47d55a0f77b92a4abba6
Author: Richard Hughes <richard hughsie com>
Date: Thu Aug 27 20:48:12 2015 +0100
Fall back to /etc/fwupd.conf if the SYSCONFDIR version does not exist
src/plugins/gs-plugin-fwupd.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-fwupd.c b/src/plugins/gs-plugin-fwupd.c
index c8d7372..a246f07 100644
--- a/src/plugins/gs-plugin-fwupd.c
+++ b/src/plugins/gs-plugin-fwupd.c
@@ -614,6 +614,10 @@ gs_plugin_fwupd_check_lvfs_metadata (GsPlugin *plugin,
/* read config file */
config = g_key_file_new ();
config_fn = g_build_filename (SYSCONFDIR, "fwupd.conf", NULL);
+ if (!g_file_test (config_fn, G_FILE_TEST_EXISTS)) {
+ g_free (config_fn);
+ config_fn = g_strdup ("/etc/fwupd.conf");
+ }
if (!g_key_file_load_from_file (config, config_fn, G_KEY_FILE_NONE, error))
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]