mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-12-03 17:32:01 +00:00
Bug #6021 Fix misuse of Sys_Mkdir (Joerg Dietrich)
This commit is contained in:
parent
99317a9e9a
commit
462694763e
1 changed files with 10 additions and 2 deletions
|
@ -513,6 +513,7 @@ void Sys_ErrorDialog( const char *error )
|
|||
const char *homepath = Cvar_VariableString( "fs_homepath" );
|
||||
const char *gamedir = Cvar_VariableString( "fs_game" );
|
||||
const char *fileName = "crashlog.txt";
|
||||
char *dirpath = FS_BuildOSPath( homepath, gamedir, "");
|
||||
char *ospath = FS_BuildOSPath( homepath, gamedir, fileName );
|
||||
|
||||
Sys_Print( va( "%s\n", error ) );
|
||||
|
@ -522,9 +523,16 @@ void Sys_ErrorDialog( const char *error )
|
|||
#endif
|
||||
|
||||
// Make sure the write path for the crashlog exists...
|
||||
if(!Sys_Mkdir(ospath))
|
||||
|
||||
if(!Sys_Mkdir(homepath))
|
||||
{
|
||||
Com_Printf("ERROR: couldn't create path '%s' for crash log.\n", ospath);
|
||||
Com_Printf("ERROR: couldn't create path '%s' for crash log.\n", homepath);
|
||||
return;
|
||||
}
|
||||
|
||||
if(!Sys_Mkdir(dirpath))
|
||||
{
|
||||
Com_Printf("ERROR: couldn't create path '%s' for crash log.\n", dirpath);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue