Skip to content
Snippets Groups Projects
Commit 10365e94 authored by Hanicef's avatar Hanicef
Browse files

Use DEFAULTDIR instead of hardcoding .srb2

parent 8794e411
No related branches found
No related tags found
1 merge request!2396Don't traverse the entire HOME directory to find wads
......@@ -1433,12 +1433,12 @@ static const char *locateWad(void)
#ifndef NOHOME
// find in $HOME
I_OutputMsg(",HOME/.srb2");
I_OutputMsg(",HOME/" DEFAULTDIR);
if ((envstr = I_GetEnv("HOME")) != NULL)
{
char *tmp = malloc(strlen(envstr) + sizeof("/.srb2"));
char *tmp = malloc(strlen(envstr) + sizeof(DEFAULTDIR));
strcpy(tmp, envstr);
strcat(tmp, "/.srb2");
strcat(tmp, DEFAULTDIR);
SEARCHWAD(envstr);
free(tmp);
}
......
......@@ -3038,13 +3038,13 @@ static const char *locateWad(void)
}
#ifndef NOHOME
// find in $HOME/.srb2
I_OutputMsg(",HOME/.srb2");
// find in $HOME
I_OutputMsg(",HOME/" DEFAULTDIR);
if ((envstr = I_GetEnv("HOME")) != NULL)
{
char *tmp = malloc(strlen(envstr) + sizeof("/.srb2"));
char *tmp = malloc(strlen(envstr) + sizeof(DEFAULTDIR));
strcpy(tmp, envstr);
strcat(tmp, "/.srb2");
strcat(tmp, DEFAULTDIR);
SEARCHWAD(envstr);
free(tmp);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment