From 17ead681d93865200176a996738bba5ad17e44b1 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 11 Jul 2017 13:17:43 +0200 Subject: [PATCH] fix pk3 archive loading pk3dir/dpkdir directories were working, not pk3/dpk archives because of wrong extension comparison. --- plugins/vfspk3/vfs.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/vfspk3/vfs.cpp b/plugins/vfspk3/vfs.cpp index e92bad76..a76fafba 100644 --- a/plugins/vfspk3/vfs.cpp +++ b/plugins/vfspk3/vfs.cpp @@ -660,7 +660,7 @@ void InitDirectory( const char* directory, ArchiveModules& archiveModules ){ for ( Archives::iterator i = archives.begin(); i != archives.end(); ++i ) { const char* name = i->c_str(); const char* ext = strrchr( name, '.' ); - if ( !string_compare_nocase_upper( ext, "dpk" ) ) { + if ( !string_compare_nocase_upper( ext, ".dpk" ) ) { CopiedString name_final = CopiedString( StringRange( name, ext ) ); fullpath = string_new_concat( path, name ); AddDpkPak( name_final.c_str(), fullpath, true ); @@ -673,8 +673,8 @@ void InitDirectory( const char* directory, ArchiveModules& archiveModules ){ { const char* name = i->c_str(); const char* ext = strrchr( name, '.' ); - if ( !string_compare_nocase_upper( ext, "pk3" ) - || !string_compare_nocase_upper( ext, "pk4" ) ) { + if ( !string_compare_nocase_upper( ext, ".pk3" ) + || !string_compare_nocase_upper( ext, ".pk4" ) ) { fullpath = string_new_concat( path, i->c_str() ); InitPakFile( archiveModules, fullpath ); string_release( fullpath, string_length( fullpath ) ); @@ -684,8 +684,8 @@ void InitDirectory( const char* directory, ArchiveModules& archiveModules ){ { const char* name = i->c_str(); const char* ext = strrchr( name, '.' ); - if ( !string_compare_nocase_upper( ext, "pk3" ) - || !string_compare_nocase_upper( ext, "pk4" ) ) { + if ( !string_compare_nocase_upper( ext, ".pk3" ) + || !string_compare_nocase_upper( ext, ".pk4" ) ) { fullpath = string_new_concat( path, i->c_str() ); InitPakFile( archiveModules, fullpath ); string_release( fullpath, string_length( fullpath ) ); -- 2.39.2