Move all filepath handling to files.c
This commit is contained in:
@@ -428,7 +428,7 @@ _inp_rl_startup_hook(void)
|
||||
rl_variable_bind("disable-completion", "on");
|
||||
|
||||
// check for and load ~/.config/profanity/inputrc
|
||||
char *inputrc = files_get_inputrc_path();
|
||||
char *inputrc = files_get_inputrc_file();
|
||||
if (inputrc) {
|
||||
rl_read_init_file(inputrc);
|
||||
free(inputrc);
|
||||
|
||||
@@ -79,10 +79,8 @@ _get_icons(void)
|
||||
|
||||
#endif /* ICONS_PATH */
|
||||
|
||||
gchar *xdg_config = files_get_xdg_config_home();
|
||||
icons_dir = g_string_new(xdg_config);
|
||||
g_free(xdg_config);
|
||||
g_string_append(icons_dir, "/profanity/icons");
|
||||
char *icons_dir_s = files_get_config_path(DIR_ICONS);
|
||||
icons_dir = g_string_new(icons_dir_s);
|
||||
GError *err = NULL;
|
||||
if (!g_file_test(icons_dir->str, G_FILE_TEST_IS_DIR)) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user