mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-25 05:41:42 +00:00
Use DEFAULTDIR instead of hardcoding .srb2
This commit is contained in:
parent
8794e411bd
commit
10365e943a
2 changed files with 7 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue