mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +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
|
#ifndef NOHOME
|
||||||
// find in $HOME
|
// find in $HOME
|
||||||
I_OutputMsg(",HOME");
|
I_OutputMsg(",HOME/" DEFAULTDIR);
|
||||||
if ((envstr = I_GetEnv("HOME")) != NULL)
|
if ((envstr = I_GetEnv("HOME")) != NULL)
|
||||||
|
{
|
||||||
|
char *tmp = malloc(strlen(envstr) + sizeof(DEFAULTDIR));
|
||||||
|
strcpy(tmp, envstr);
|
||||||
|
strcat(tmp, DEFAULTDIR);
|
||||||
SEARCHWAD(envstr);
|
SEARCHWAD(envstr);
|
||||||
|
free(tmp);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// search paths
|
// search paths
|
||||||
|
|
|
@ -3050,9 +3050,15 @@ static const char *locateWad(void)
|
||||||
|
|
||||||
#ifndef NOHOME
|
#ifndef NOHOME
|
||||||
// find in $HOME
|
// find in $HOME
|
||||||
I_OutputMsg(",HOME");
|
I_OutputMsg(",HOME/" DEFAULTDIR);
|
||||||
if ((envstr = I_GetEnv("HOME")) != NULL)
|
if ((envstr = I_GetEnv("HOME")) != NULL)
|
||||||
|
{
|
||||||
|
char *tmp = malloc(strlen(envstr) + sizeof(DEFAULTDIR));
|
||||||
|
strcpy(tmp, envstr);
|
||||||
|
strcat(tmp, DEFAULTDIR);
|
||||||
SEARCHWAD(envstr);
|
SEARCHWAD(envstr);
|
||||||
|
free(tmp);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// search paths
|
// search paths
|
||||||
|
|
Loading…
Reference in a new issue