mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-20 19:02:37 +00:00
Don't allow custom gamedata to overwrite kart gamedata or replay folders
This commit is contained in:
parent
489032f734
commit
98dbdd7db5
1 changed files with 6 additions and 5 deletions
|
@ -2142,11 +2142,12 @@ static boolean GoodDataFileName(const char *s)
|
|||
p = s + strlen(s) - strlen(tail);
|
||||
if (p <= s) return false; // too short
|
||||
if (!fasticmp(p, tail)) return false; // doesn't end in .dat
|
||||
#ifdef DELFILE
|
||||
if (fasticmp(s, "gamedata.dat") && !disableundo) return false;
|
||||
#else
|
||||
if (fasticmp(s, "gamedata.dat")) return false;
|
||||
#endif
|
||||
|
||||
if (fasticmp(s, "gamedata.dat")) return false; // Vanilla SRB2 gamedata
|
||||
if (fasticmp(s, "main.dat")) return false; // Vanilla SRB2 time attack replay folder
|
||||
if (fasticmp(s, "kartdata.dat")) return false; // SRB2Kart gamedata
|
||||
if (fasticmp(s, "kart.dat")) return false; // SRB2Kart time attack replay folder
|
||||
if (fasticmp(s, "online.dat")) return false; // SRB2Kart online replay folder
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue