diff src/status.c @ 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 84d73473c019
children 64bc206c7473
line wrap: on
line diff
--- 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);