changeset 1897:97b1667e1255

[gaim-migrate @ 1907] hola committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 25 May 2001 23:07:22 +0000
parents e556ffa08cce
children 73d73939f698
files src/dialogs.c
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/dialogs.c	Fri May 25 12:54:30 2001 +0000
+++ b/src/dialogs.c	Fri May 25 23:07:22 2001 +0000
@@ -3483,7 +3483,9 @@
 
 	name = gtk_object_get_user_data(GTK_OBJECT(filesel));
 	tmp = gaim_user_dir();
-	g_snprintf(filename, PATHSIZE, "%s/logs/%s.log", tmp, normalize(name));
+	g_snprintf(filename, PATHSIZE, "%s/logs/%s%s", tmp,
+			name ? normalize(name) : "system",
+			name ? ".log" : "");
 	g_free(tmp);
 
 	file = gtk_file_selection_get_filename(GTK_FILE_SELECTION(filesel));
@@ -3524,8 +3526,9 @@
 	GtkWidget *filesel;
 	gchar buf[BUF_LEN];
 
-	g_snprintf(buf, BUF_LEN - 1, "%s/%s.log", 
-		   getenv("HOME"), normalize(name));
+	g_snprintf(buf, BUF_LEN - 1, "%s/%s%s", getenv("HOME"),
+			name ? normalize(name) : "system",
+			name ? ".log" : "");
 
 	filesel = gtk_file_selection_new(_("Gaim - Save Log File"));
 	dialogwindows = g_list_prepend(dialogwindows, filesel);
@@ -3556,7 +3559,9 @@
 	char *tmp;
 
 	tmp = gaim_user_dir();
-	g_snprintf(filename, 256, "%s/logs/%s.log", tmp, normalize(name));
+	g_snprintf(filename, 256, "%s/logs/%s%s", tmp,
+			name ? normalize(name) : "system",
+			name ? ".log" : "");
 	g_free(tmp);
 
 	if ((remove(filename)) == -1) {