mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-24 21:31:46 +00:00
Merge branch 'avoid-traversing-home' into 'next'
Don't traverse the entire HOME directory to find wads See merge request STJr/SRB2!2396
This commit is contained in:
commit
7cff7f7746
2 changed files with 14 additions and 2 deletions
|
@ -1433,9 +1433,15 @@ static const char *locateWad(void)
|
|||
|
||||
#ifndef NOHOME
|
||||
// find in $HOME
|
||||
I_OutputMsg(",HOME");
|
||||
I_OutputMsg(",HOME/" DEFAULTDIR);
|
||||
if ((envstr = I_GetEnv("HOME")) != NULL)
|
||||
{
|
||||
char *tmp = malloc(strlen(envstr) + sizeof(DEFAULTDIR));
|
||||
strcpy(tmp, envstr);
|
||||
strcat(tmp, DEFAULTDIR);
|
||||
SEARCHWAD(envstr);
|
||||
free(tmp);
|
||||
}
|
||||
#endif
|
||||
|
||||
// search paths
|
||||
|
|
|
@ -3050,9 +3050,15 @@ static const char *locateWad(void)
|
|||
|
||||
#ifndef NOHOME
|
||||
// find in $HOME
|
||||
I_OutputMsg(",HOME");
|
||||
I_OutputMsg(",HOME/" DEFAULTDIR);
|
||||
if ((envstr = I_GetEnv("HOME")) != NULL)
|
||||
{
|
||||
char *tmp = malloc(strlen(envstr) + sizeof(DEFAULTDIR));
|
||||
strcpy(tmp, envstr);
|
||||
strcat(tmp, DEFAULTDIR);
|
||||
SEARCHWAD(envstr);
|
||||
free(tmp);
|
||||
}
|
||||
#endif
|
||||
|
||||
// search paths
|
||||
|
|
Loading…
Reference in a new issue