Don't allow qagame module to create "botlib.log" at ANY filesystem location
This commit is contained in:
parent
7166a3cd39
commit
f3bdd6f022
2 changed files with 5 additions and 21 deletions
|
@ -144,26 +144,7 @@ int Export_BotLibSetup(void)
|
|||
|
||||
if(botDeveloper)
|
||||
{
|
||||
char *homedir, *gamedir, *basegame;
|
||||
char logfilename[MAX_OSPATH];
|
||||
|
||||
homedir = LibVarGetString("homedir");
|
||||
gamedir = LibVarGetString("gamedir");
|
||||
basegame = LibVarGetString("basegame");
|
||||
|
||||
if (*homedir)
|
||||
{
|
||||
if(*gamedir)
|
||||
Com_sprintf(logfilename, sizeof(logfilename), "%s%c%s%cbotlib.log", homedir, PATH_SEP, gamedir, PATH_SEP);
|
||||
else if(*basegame)
|
||||
Com_sprintf(logfilename, sizeof(logfilename), "%s%c%s%cbotlib.log", homedir, PATH_SEP, basegame, PATH_SEP);
|
||||
else
|
||||
Com_sprintf(logfilename, sizeof(logfilename), "%s%c" BASEGAME "%cbotlib.log", homedir, PATH_SEP, PATH_SEP);
|
||||
}
|
||||
else
|
||||
Com_sprintf(logfilename, sizeof(logfilename), "botlib.log");
|
||||
|
||||
Log_Open(logfilename);
|
||||
Log_Open("botlib.log");
|
||||
}
|
||||
|
||||
botimport.Print(PRT_MESSAGE, "------- BotLib Initialization -------\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue