]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
fix pk3 archive loading 49/head
authorThomas Debesse <dev@illwieckz.net>
Tue, 11 Jul 2017 11:17:43 +0000 (13:17 +0200)
committerThomas Debesse <dev@illwieckz.net>
Tue, 11 Jul 2017 11:17:43 +0000 (13:17 +0200)
pk3dir/dpkdir directories were working, not pk3/dpk archives because of
wrong extension comparison.

plugins/vfspk3/vfs.cpp

index e92bad76c016694bda7f4391d1fa2c0b6f478050..a76fafbaabe211c3ae04262538c9847327c56195 100644 (file)
@@ -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 ) );