From e0f9170849e9c4aaa679f86703a60686d36607bb Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Fri, 27 Jun 2008 00:18:31 +0100 Subject: xml_remove() didn't convert nicknames to lowercase so it caused some confusing errors sometimes. This should close #395. --- storage_xml.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'storage_xml.c') diff --git a/storage_xml.c b/storage_xml.c index ab7da6e3..ca82a9d1 100644 --- a/storage_xml.c +++ b/storage_xml.c @@ -480,14 +480,18 @@ static gboolean xml_save_nick( gpointer key, gpointer value, gpointer data ) static storage_status_t xml_remove( const char *nick, const char *password ) { - char s[512]; + char s[512], *lc; storage_status_t status; status = xml_check_pass( nick, password ); if( status != STORAGE_OK ) return status; - g_snprintf( s, 511, "%s%s%s", global.conf->configdir, nick, ".xml" ); + lc = g_strdup( nick ); + nick_lc( lc ); + g_snprintf( s, 511, "%s%s%s", global.conf->configdir, lc, ".xml" ); + g_free( lc ); + if( unlink( s ) == -1 ) return STORAGE_OTHER_ERROR; -- cgit v1.2.3