mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-22 04:01:17 +00:00
make sure com_gamedir exists before writing config.cfg
This commit is contained in:
parent
37eb211c0a
commit
6b3f8e5dba
1 changed files with 3 additions and 1 deletions
|
@ -1425,7 +1425,9 @@ void Host_WriteConfiguration (void)
|
|||
|
||||
if (host_initialized)
|
||||
{
|
||||
f = Qopen (va("%s/config.cfg",com_gamedir), "w");
|
||||
char *path = va("%s/config.cfg",com_gamedir);
|
||||
COM_CreatePath (path);
|
||||
f = Qopen (path, "w");
|
||||
if (!f)
|
||||
{
|
||||
Con_Printf ("Couldn't write config.cfg.\n");
|
||||
|
|
Loading…
Reference in a new issue