diff options
-rw-r--r-- | storage_xml.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage_xml.c b/storage_xml.c index ba311120..00fca425 100644 --- a/storage_xml.c +++ b/storage_xml.c @@ -394,7 +394,7 @@ static storage_status_t xml_save( irc_t *irc, int overwrite ) return STORAGE_ALREADY_EXISTS; strcat( path, "~" ); - if( ( fd = open( path, O_WRONLY | O_CREAT, 0600 ) ) < 0 ) + if( ( fd = open( path, O_WRONLY | O_CREAT | O_TRUNC, 0600 ) ) < 0 ) { irc_usermsg( irc, "Error while opening configuration file." ); return STORAGE_OTHER_ERROR; |