diff --git a/code/qcommon/files.c b/code/qcommon/files.c index 71613cd8..16869afc 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.c @@ -3072,13 +3072,12 @@ qboolean FS_CheckDirTraversal(const char *checkdir) FS_InvalidGameDir return true if path is a reference to current directory or directory traversal +or a sub-directory ================ */ qboolean FS_InvalidGameDir( const char *gamedir ) { if ( !strcmp( gamedir, "." ) || !strcmp( gamedir, ".." ) - || !strcmp( gamedir, "/" ) || !strcmp( gamedir, "\\" ) - || strstr( gamedir, "/.." ) || strstr( gamedir, "\\.." ) - || FS_CheckDirTraversal( gamedir ) ) { + || strchr( gamedir, '/' ) || strchr( gamedir, '\\' ) ) { return qtrue; }