aboutsummaryrefslogtreecommitdiff
path: root/irc/xchat/files/patch-xc284-scrollbmkdir
diff options
context:
space:
mode:
Diffstat (limited to 'irc/xchat/files/patch-xc284-scrollbmkdir')
-rw-r--r--irc/xchat/files/patch-xc284-scrollbmkdir33
1 files changed, 33 insertions, 0 deletions
diff --git a/irc/xchat/files/patch-xc284-scrollbmkdir b/irc/xchat/files/patch-xc284-scrollbmkdir
new file mode 100644
index 000000000000..2ac328497a8b
--- /dev/null
+++ b/irc/xchat/files/patch-xc284-scrollbmkdir
@@ -0,0 +1,33 @@
+#
+# Fix creation of ~/.xchat2/scrollback/ paths.
+#
+--- src/common/text.c 15 Jun 2007 03:53:42 -0000 1.89
++++ 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;
+ }
+