changeset 10343:ee4f477fc8cf

[gaim-migrate @ 11553] Minor tweaks to the blist and status xml reading code. These functions don't expect the filename to be called "blist.xml" and "status.xml" anymore. Some guy wanted this because he wants to try to add some sort of AIM buddy list importing, or something. I think. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 10 Dec 2004 05:49:01 +0000
parents 476bf80b8ad8
children 5976491e07a7
files src/blist.c src/status.c
diffstat 2 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/blist.c	Fri Dec 10 05:26:26 2004 +0000
+++ b/src/blist.c	Fri Dec 10 05:49:01 2004 +0000
@@ -1959,7 +1959,7 @@
 	gaim_debug_info("blist", "Reading %s\n", filename);
 
 	if (!g_file_get_contents(filename, &contents, &length, &error)) {
-		gaim_debug_error("blist", "Error reading blist.xml: %s\n",
+		gaim_debug_error("blist", "Error reading buddy list: %s\n",
 						 error->message);
 		g_error_free(error);
 		return FALSE;
@@ -1970,8 +1970,8 @@
 	if (gaim == NULL) {
 		FILE *backup;
 		char *name;
-		gaim_debug_error("blist", "Error parsing blist.xml\n");
-		name = g_build_filename(gaim_user_dir(), "blist.xml~", NULL);
+		gaim_debug_error("blist", "Error parsing buddy list\n");
+		name = g_strdup_printf("%s~", filename);
 		if ((backup = fopen(name, "w"))) {
 			fwrite(contents, length, 1, backup);
 			fclose(backup);
@@ -2036,7 +2036,7 @@
 		}
 	}
 
-	gaim_debug_info("blist", "Finished reading blist.xml\n");
+	gaim_debug_info("blist", "Finished reading buddy list\n");
 
 	xmlnode_free(gaim);
 
@@ -2280,7 +2280,7 @@
 
 	if (exp_acct && chat->account != exp_acct)
 		return;
-	
+
 	acct_name = g_markup_escape_text(chat->account->username, -1);
 	fprintf(file, "\t\t\t<chat proto=\"%s\" account=\"%s\">\n",
 			gaim_account_get_protocol_id(chat->account), acct_name);
--- a/src/status.c	Fri Dec 10 05:26:26 2004 +0000
+++ b/src/status.c	Fri Dec 10 05:49:01 2004 +0000
@@ -1829,7 +1829,7 @@
 	gaim_debug_info("status", "Reading %s\n", filename);
 
 	if (!g_file_get_contents(filename, &contents, &length, &error)) {
-		gaim_debug_error("status", "Error reading status.xml: %s\n",
+		gaim_debug_error("status", "Error reading statuses: %s\n",
 						 error->message);
 		g_error_free(error);
 		return FALSE;
@@ -1840,8 +1840,8 @@
 	if (statuses == NULL) {
 		FILE *backup;
 		gchar *name;
-		gaim_debug_error("status", "Error parsing status.xml\n");
-		name = g_build_filename(gaim_user_dir(), "status.xml~", NULL);
+		gaim_debug_error("status", "Error parsing statuses\n");
+		name = g_strdup_printf("%s~", filename);
 		if ((backup = fopen(name, "w"))) {
 			fwrite(contents, length, 1, backup);
 			fclose(backup);
@@ -1861,7 +1861,7 @@
 		gaim_statuses_read_parse_status(status);
 	}
 
-	gaim_debug_info("status", "Finished reading status.xml\n");
+	gaim_debug_info("status", "Finished reading statuses\n");
 
 	xmlnode_free(statuses);