Merge branch 'jartha/fix-replay-slash' into 'master'

Replays: replace slashes in branch name with hyphen

Closes #1562

See merge request kart-krew-dev/ring-racers-internal!2617
This commit is contained in:
Oni VelocitOni 2025-06-04 02:22:37 +00:00
commit 2c920f1fec

View file

@ -8159,6 +8159,15 @@ static void P_InitGametype(void)
#else
strcpy(ver, VERSIONSTRING);
#endif
// Replace path separators with hyphens
{
char *p = ver;
while ((p = strpbrk(p, "/\\")))
{
*p = '-';
p++;
}
}
sprintf(buf, "%s" PATHSEP "media" PATHSEP "replay" PATHSEP "online" PATHSEP "%s" PATHSEP "%d-%s",
srb2home, ver, (int) (time(NULL)), G_BuildMapName(gamemap));