mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Delete ban.txt if no bans to save
This commit is contained in:
parent
1938e1e736
commit
1ab49f48d3
1 changed files with 5 additions and 1 deletions
|
|
@ -2870,11 +2870,15 @@ void D_SaveBan(void)
|
|||
size_t i;
|
||||
banreason_t *reasonlist = reasonhead;
|
||||
const char *address, *mask;
|
||||
const char *path = va("%s"PATHSEP"%s", srb2home, "ban.txt");
|
||||
|
||||
if (!reasonhead)
|
||||
{
|
||||
remove(path);
|
||||
return;
|
||||
}
|
||||
|
||||
f = fopen(va("%s"PATHSEP"%s", srb2home, "ban.txt"), "w");
|
||||
f = fopen(path, "w");
|
||||
|
||||
if (!f)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue