diff options
author | TotalCaesar659 <x24cm5b8c54q6szxw@yandex.ru> | 2018-05-28 01:11:16 +0300 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2018-05-27 15:11:16 -0700 |
commit | 06b0d18501c7e25c8d22fa53a9cd5f381334fc44 (patch) | |
tree | df619dbd02f7ac2c81c4842adbc71663ce0652de /hardinfo | |
parent | f7aa47059ad769040f699921a9802bd8dc80f00b (diff) |
Moving configuration files to user's configuration folder
Build the configuration file path using g_get_user_config_dir() instead of g_get_home_dir().
Diffstat (limited to 'hardinfo')
-rw-r--r-- | hardinfo/util.c | 2 | ||||
-rw-r--r-- | hardinfo/vendor.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/hardinfo/util.c b/hardinfo/util.c index ddbc2620..4b1637d6 100644 --- a/hardinfo/util.c +++ b/hardinfo/util.c @@ -491,7 +491,7 @@ void parameters_init(int *argc, char ***argv, ProgramParameters * param) if (report_format && g_str_equal(report_format, "html")) param->report_format = REPORT_FORMAT_HTML; - gchar *confdir = g_build_filename(g_get_home_dir(), ".hardinfo", NULL); + gchar *confdir = g_build_filename(g_get_user_config_dir(), "hardinfo", NULL); if (!g_file_test(confdir, G_FILE_TEST_EXISTS)) { mkdir(confdir, 0744); } diff --git a/hardinfo/vendor.c b/hardinfo/vendor.c index a5aaecef..86705e10 100644 --- a/hardinfo/vendor.c +++ b/hardinfo/vendor.c @@ -143,7 +143,7 @@ void vendor_init(void) DEBUG("initializing vendor list"); sync_manager_add_entry(&se); - path = g_build_filename(g_get_home_dir(), ".hardinfo", "vendor.conf", NULL); + path = g_build_filename(g_get_user_config_dir(), "hardinfo", "vendor.conf", NULL); if (!g_file_test(path, G_FILE_TEST_EXISTS)) { DEBUG("local vendor.conf not found, trying system-wise"); g_free(path); |