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