Rediff patches.
[packages/irssi.git] / irssi-home_etc.patch
CommitLineData
20ce40f7
AM
1diff -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;
5a521683 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 = ".";
20ce40f7
AM
14
15diff -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)
5a521683 19 away_msgs = 0;
60ee30af 20
6cd21451 21 awaylog_file = g_strconcat(get_irssi_dir(), "/away.log", NULL);
22- settings_add_str("log", "awaylog_file", awaylog_file);
5a521683 23+ char *home_etc = getenv("HOME_ETC");
5a521683 24+ if (home_etc) {
60ee30af 25+ char *log = g_strdup_printf("%s/.irssi/away.log", home_etc);
5a521683 26+ settings_add_str("log", "awaylog_file", log);
27+ } else
6cd21451 28+ settings_add_str("log", "awaylog_file", awaylog_file);
29 g_free(awaylog_file);
60ee30af 30 settings_add_level("log", "awaylog_level", "msgs hilight");
20ce40f7 31
This page took 0.514443 seconds and 4 git commands to generate.