mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-26 03:01:11 +00:00
Don't traverse the entire HOME directory to find wads
This commit is contained in:
parent
940756ad62
commit
8794e411bd
2 changed files with 15 additions and 3 deletions
|
@ -1433,9 +1433,15 @@ static const char *locateWad(void)
|
|||
|
||||
#ifndef NOHOME
|
||||
// find in $HOME
|
||||
I_OutputMsg(",HOME");
|
||||
I_OutputMsg(",HOME/.srb2");
|
||||
if ((envstr = I_GetEnv("HOME")) != NULL)
|
||||
{
|
||||
char *tmp = malloc(strlen(envstr) + sizeof("/.srb2"));
|
||||
strcpy(tmp, envstr);
|
||||
strcat(tmp, "/.srb2");
|
||||
SEARCHWAD(envstr);
|
||||
free(tmp);
|
||||
}
|
||||
#endif
|
||||
|
||||
// search paths
|
||||
|
|
|
@ -3038,10 +3038,16 @@ static const char *locateWad(void)
|
|||
}
|
||||
|
||||
#ifndef NOHOME
|
||||
// find in $HOME
|
||||
I_OutputMsg(",HOME");
|
||||
// find in $HOME/.srb2
|
||||
I_OutputMsg(",HOME/.srb2");
|
||||
if ((envstr = I_GetEnv("HOME")) != NULL)
|
||||
{
|
||||
char *tmp = malloc(strlen(envstr) + sizeof("/.srb2"));
|
||||
strcpy(tmp, envstr);
|
||||
strcat(tmp, "/.srb2");
|
||||
SEARCHWAD(envstr);
|
||||
free(tmp);
|
||||
}
|
||||
#endif
|
||||
|
||||
// search paths
|
||||
|
|
Loading…
Reference in a new issue