Rediff patches.
[packages/irssi.git] / irssi-home_etc.patch
1 diff -urNp -x '*.orig' irssi-1.2.2.org/src/core/core.c irssi-1.2.2/src/core/core.c
2 --- irssi-1.2.2.org/src/core/core.c     2019-08-29 15:48:46.000000000 +0200
3 +++ irssi-1.2.2/src/core/core.c 2021-05-04 21:22:39.960299530 +0200
4 @@ -193,7 +193,9 @@ void core_preinit(const char *path)
5         int len;
6  
7         if (irssi_dir == NULL) {
8 -               home = g_get_home_dir();
9 +               home = getenv("HOME_ETC");
10 +               if (home == NULL)
11 +                       home = g_get_home_dir();
12                 if (home == NULL)
13                         home = ".";
14  
15 diff -urNp -x '*.orig' irssi-1.2.2.org/src/core/log-away.c irssi-1.2.2/src/core/log-away.c
16 --- irssi-1.2.2.org/src/core/log-away.c 2019-08-29 15:48:46.000000000 +0200
17 +++ irssi-1.2.2/src/core/log-away.c     2021-05-04 21:22:39.960299530 +0200
18 @@ -112,7 +112,12 @@ void log_away_init(void)
19         away_msgs = 0;
20  
21         awaylog_file = g_strconcat(get_irssi_dir(), "/away.log", NULL);
22 -       settings_add_str("log", "awaylog_file", awaylog_file);
23 +       char *home_etc = getenv("HOME_ETC");
24 +       if (home_etc) {
25 +               char *log = g_strdup_printf("%s/.irssi/away.log", home_etc);
26 +               settings_add_str("log", "awaylog_file", log);
27 +       } else
28 +               settings_add_str("log", "awaylog_file", awaylog_file);
29         g_free(awaylog_file);
30         settings_add_level("log", "awaylog_level", "msgs hilight");
31  
This page took 0.152057 seconds and 3 git commands to generate.