diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2008-06-27 00:18:31 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2008-06-27 00:18:31 +0100 |
commit | e0f9170849e9c4aaa679f86703a60686d36607bb (patch) | |
tree | a8ad01de9f05aa77970b533ea9590d391d23841f /storage_xml.c | |
parent | d048ffce031ff9f674f20be37f6bfbb18047004f (diff) |
xml_remove() didn't convert nicknames to lowercase so it caused some confusing
errors sometimes. This should close #395.
Diffstat (limited to 'storage_xml.c')
-rw-r--r-- | storage_xml.c | 8 |
1 files changed, 6 insertions, 2 deletions
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; |