skip *.pk3dir in root in DirectoryArchive::forEachFile

This commit is contained in:
Garux
2023-07-04 14:24:45 +06:00
parent 7396eef067
commit 3fb507e860
2 changed files with 3 additions and 8 deletions

View File

@@ -90,7 +90,8 @@ public:
dirs.pop_back();
path.pop();
}
else if ( !string_equal( name, "." ) && !string_equal( name, ".." ) ) {
else if ( !string_equal( name, "." ) && !string_equal( name, ".." )
&& !( string_empty( root ) && string_equal_suffix_nocase( name, ".pk3dir" ) ) ) { //skip *.pk3dir in root, it is processed as DirectoryArchive
path.push_filename( name );
bool is_directory = file_is_directory( path.c_str() );