mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
Apply srb2home to saveconfig ONLY if srb2home isn't already there
This commit is contained in:
parent
93f7f0a8df
commit
d18b2cda59
1 changed files with 6 additions and 3 deletions
|
@ -534,8 +534,11 @@ void M_SaveConfig(const char *filename)
|
||||||
}
|
}
|
||||||
|
|
||||||
// append srb2home to beginning of filename
|
// append srb2home to beginning of filename
|
||||||
// configfile already has this applied
|
// but check if srb2home isn't already there, first
|
||||||
filepath = va(pandf,srb2home, filename);
|
if (!strstr(filename, srb2home))
|
||||||
|
filepath = va(pandf,srb2home, filename);
|
||||||
|
else
|
||||||
|
filepath = Z_StrDup(filename);
|
||||||
|
|
||||||
f = fopen(filepath, "w");
|
f = fopen(filepath, "w");
|
||||||
// change it only if valid
|
// change it only if valid
|
||||||
|
@ -543,7 +546,7 @@ void M_SaveConfig(const char *filename)
|
||||||
strcpy(configfile, filepath);
|
strcpy(configfile, filepath);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_ERROR, M_GetText("Couldn't save game config file %s\n"), filename);
|
CONS_Alert(CONS_ERROR, M_GetText("Couldn't save game config file %s\n"), filepath);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue