mirror of
https://github.com/irssi/irssi.git
synced 2026-08-21 17:42:49 +02:00
add XDG support to log/modules/fe-text
- title - fixed some comments refering to ~/.irssi
This commit is contained in:
parent
43e956d16b
commit
a7e91f0ef2
3 changed files with 9 additions and 3 deletions
|
|
@ -111,6 +111,9 @@ void log_away_init(void)
|
|||
away_filepos = 0;
|
||||
away_msgs = 0;
|
||||
|
||||
if (is_xdg_supported())
|
||||
awaylog_file = g_build_filename(g_get_user_cache_dir(), "irssi", "away.log", NULL);
|
||||
else
|
||||
awaylog_file = g_strconcat(get_irssi_dir(), "/away.log", NULL);
|
||||
settings_add_str("log", "awaylog_file", awaylog_file);
|
||||
g_free(awaylog_file);
|
||||
|
|
|
|||
|
|
@ -115,6 +115,9 @@ static GModule *module_open(const char *name, int *found)
|
|||
path = g_strdup(name);
|
||||
else {
|
||||
/* first try from home dir */
|
||||
if (is_xdg_supported())
|
||||
str = g_build_filename(g_get_user_data_dir(), "irssi", "modules", NULL);
|
||||
else
|
||||
str = g_strdup_printf("%s/modules", get_irssi_dir());
|
||||
path = g_module_build_path(str, name);
|
||||
g_free(str);
|
||||
|
|
|
|||
|
|
@ -281,7 +281,7 @@ static void check_files(void)
|
|||
struct stat statbuf;
|
||||
|
||||
if (stat(get_irssi_dir(), &statbuf) != 0) {
|
||||
/* ~/.irssi doesn't exist, first time running irssi */
|
||||
/* irssi config folder doesn't exist, first time running irssi */
|
||||
display_firsttimer = TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue