Changeset 55078f5


Ignore:
Timestamp:
2006-11-25T09:20:29Z (18 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
a3a3778, d8d63a2
Parents:
dfc8a46
Message:

Forgot to pass O_CREAT to open() which can cause problems if there's a
stale .xml~ file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • storage_xml.c

    rdfc8a46 r55078f5  
    395395       
    396396        strcat( path, "~" );
    397         if( ( fd = open( path, O_WRONLY | O_CREAT, 0600 ) ) < 0 )
     397        if( ( fd = open( path, O_WRONLY | O_CREAT | O_TRUNC, 0600 ) ) < 0 )
    398398        {
    399399                irc_usermsg( irc, "Error while opening configuration file." );
Note: See TracChangeset for help on using the changeset viewer.