mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-03 06:20:57 +00:00
console.c (LOG_Init): Removed the O_APPEND flag when opening the log file.
It was a legacy from Quake who used to open and close the log file on every write. Commented out the unlink() call and added O_TRUNC to the open flags. git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@476 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
162f18573e
commit
0c82fbc646
1 changed files with 2 additions and 2 deletions
|
@ -1261,9 +1261,9 @@ void LOG_Init (quakeparms_t *parms)
|
|||
strftime (session, sizeof(session), "%m/%d/%Y %H:%M:%S", localtime(&inittime));
|
||||
q_snprintf (logfilename, sizeof(logfilename), "%s/qconsole.log", parms->basedir);
|
||||
|
||||
unlink (logfilename);
|
||||
// unlink (logfilename);
|
||||
|
||||
log_fd = open (logfilename, O_WRONLY | O_CREAT | O_APPEND, 0666);
|
||||
log_fd = open (logfilename, O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
||||
if (log_fd == -1)
|
||||
{
|
||||
fprintf (stderr, "Error: Unable to create log file %s\n", logfilename);
|
||||
|
|
Loading…
Reference in a new issue