Make sure / or C:\ doesn't get search by idFileSystemLocal::ListMods()

That could happen if the searchpath was "" (like the default value of
fs_cdpath ...).
I don't think it could do any damage, but it's confusing (if "developer"
CVar is enabled) and pointless.
It caused lots of "Non-portable: path contains uppercase characters: .."
Warnings, which now also become more readable by adding a newline.
This commit is contained in:
Daniel Gibson 2020-07-20 02:19:11 +02:00
parent 3e8601e925
commit 28e83b27a1

View file

@ -798,7 +798,7 @@ const char *idFileSystemLocal::BuildOSPath( const char *base, const char *game,
if ( testPath.HasUpper() ) {
common->DPrintf( "Non-portable: path contains uppercase characters: %s", testPath.c_str() );
common->DPrintf( "Non-portable: path contains uppercase characters: %s\n", testPath.c_str() );
// attempt a fixup on the fly
if ( fs_caseSensitiveOS.GetBool() ) {
@ -1709,6 +1709,10 @@ idModList *idFileSystemLocal::ListMods( void ) {
search[3] = fs_cdpath.GetString();
for ( isearch = 0; isearch < 4; isearch++ ) {
// skip empty cdpath or such, so we don't search C:\ or / -_-
if ( search[ isearch ][ 0 ] == '\0' ) {
continue;
}
dirs.Clear();
pk4s.Clear();