diff src/dialogs.c @ 1634:d029dc28a61e

[gaim-migrate @ 1644] good things. patches from baldnik, aechols. still haven't put in decklin's patch, i need to get to that. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 23 Mar 2001 11:37:41 +0000
parents 1e2cc8c8bf3c
children 09445224e2d9
line wrap: on
line diff
--- a/src/dialogs.c	Fri Mar 23 07:12:10 2001 +0000
+++ b/src/dialogs.c	Fri Mar 23 11:37:41 2001 +0000
@@ -3718,8 +3718,15 @@
 
 	string = g_string_new("");
 
-	g_snprintf(filename, 256, "%s/logs/%s.log", 
-	gaim_user_dir(), normalize(name));
+	if (name) {
+		char *tmp = gaim_user_dir();
+		g_snprintf(filename, 256, "%s/logs/%s.log", tmp, normalize(name));
+		g_free(tmp);
+	} else {
+		char *tmp = gaim_user_dir();
+		g_snprintf(filename, 256, "%s/logs/system", tmp);
+		g_free(tmp);
+	}
 	if ((fp = fopen(filename, "r")) == NULL) {
 		g_snprintf(buf, BUF_LONG, "Unable to open log file %s", filename);
 		do_error_dialog(buf, "Error!");