Permission-less saveconfig

This commit is contained in:
cypress 2024-07-06 11:05:04 -07:00 committed by GitHub
parent 8a019089a8
commit 46f4bc06fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4164,11 +4164,15 @@ static void Cmd_WriteConfig_f(void)
Q_snprintfz(fname, sizeof(fname), "%s", filename);
COM_RequireExtension(fname, ".cfg", sizeof(fname));
// NZ:P Start -- Restricting saveconfig like this seems silly, but I imagine I'll eat those works eventually.
#if 0
if (Cmd_IsInsecure() && strncmp(fname, "data/", 5))
{
Con_Printf ("%s %s: not allowed\n", Cmd_Argv(0), Cmd_Args());
return;
}
#endif
// NZ:P End
FS_NativePath(fname, FS_BASEGAMEONLY, sysname, sizeof(sysname));
FS_CreatePath(fname, FS_BASEGAMEONLY);