Only match default.cfg and */default.cfg.
Rationale is that someone in Xonotic created a file called
binds-default.cfg and didn't know about this magic here, leading to
https://gitlab.com/xonotic/xonotic-data.pk3dir/issues/1444 and
https://gitlab.com/xonotic/xonotic-data.pk3dir/issues/1448
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12138
d7cf8633-e32d-0410-b094-
e92efae38249
::stable-branch::merge=
6b35b45bab4d85378a2c813313811a73bfaeccc4
{
char *f;
size_t filenameLen = strlen(filename);
- qboolean isdefaultcfg = filenameLen >= 11 && !strcmp(filename + filenameLen - 11, "default.cfg");
+ qboolean isdefaultcfg =
+ !strcmp(filename, "default.cfg") ||
+ (filenameLen >= 12 && !strcmp(filename + filenameLen - 12, "/default.cfg"));
if (!strcmp(filename, "config.cfg"))
{