- if (FS_CheckNastyPath (list.strings[i], true)) continue;
- if (!FS_CheckGameDir(list.strings[i])) continue;
+
+ // check if we can get a description of the gamedir (from modinfo.txt),
+ // or if the directory is valid but has no description (fs_checkgamedir_missing)
+ // otherwise this isn't a valid gamedir
+ description = FS_CheckGameDir(list.strings[i]);
+ if (description == NULL || description == fs_checkgamedir_missing) continue;