Don't traverse the entire HOME directory to find wads
https://git.do.srb2.org/STJr/SRB2/-/merge_requests/2396
This commit is contained in:
1 parent
20dd32e716
commit
1f019ed277
1 file changed
+5
-1
+5
-1
@@ -4039,12 +4039,16 @@ static const char *locateWad(void)
|
||||
#endif
|
||||
#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);
|
||||
WadPath = searchWad(envstr);
|
||||
if (WadPath)
|
||||
return WadPath;
|
||||
free(tmp);
|
||||
}
|
||||
#endif
|
||||
#ifdef DEFAULTSEARCHPATH1
|
||||
|
||||
Reference in new issue
Block a user