1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#
# Fix creation of ~/.xchat2/scrollback/ paths.
#
--- xchat-2.8.4/src/common/text.c 15 Jun 2007 03:53:42 -0000 1.89
+++ xchat-2.8.4p1/src/common/text.c 8 Jul 2007 08:59:02 -0000
@@ -49,20 +49,25 @@
static void mkdir_p (char *dir);
+static char *log_create_filename (char *channame);
static char *
scrollback_get_filename (session *sess, char *buf, int max)
{
- char *net;
+ char *net, *chan;
net = server_get_network (sess->server, FALSE);
if (!net)
return NULL;
- snprintf (buf, max, "%s/scrollback/%s/%s.txt", get_xdir_fs (), net, sess->channel);
+ snprintf (buf, max, "%s/scrollback/%s/%s.txt", get_xdir_fs (), net, "");
mkdir_p (buf);
+ chan = log_create_filename (sess->channel);
+ snprintf (buf, max, "%s/scrollback/%s/%s.txt", get_xdir_fs (), net, chan);
+ free (chan);
+
return buf;
}
|