mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-23 12:53:09 +00:00
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:
parent
3e8601e925
commit
28e83b27a1
1 changed files with 5 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue