Fix a problem with zip archive indexing where files with similar names could clash.

This commit is contained in:
Konstantin Isakov 2012-01-23 20:59:16 -08:00
parent d5e03ae635
commit 0ab5ae44a7
2 changed files with 3 additions and 7 deletions

View file

@ -968,12 +968,8 @@ void IndexedWords::addWord( wstring const & word, uint32_t articleOffset )
void IndexedWords::addSingleWord( wstring const & word, uint32_t articleOffset )
{
vector< WordArticleLink > links( 1, WordArticleLink( Utf8::encode( word ),
articleOffset ) );
insert(
IndexedWords::value_type(
Utf8::encode( Folding::apply( word ) ), links ) );
operator []( Utf8::encode( Folding::apply( word ) ) ).push_back(
WordArticleLink( Utf8::encode( word ), articleOffset ) );
}
IndexInfo buildIndex( IndexedWords const & indexedWords, File::Class & file )

2
dsl.cc
View file

@ -71,7 +71,7 @@ enum
{
Signature = 0x584c5344, // DSLX on little-endian, XLSD on big-endian
CurrentFormatVersion = 14 + BtreeIndexing::FormatVersion + Folding::Version,
CurrentZipSupportVersion = 1
CurrentZipSupportVersion = 2
};
struct IdxHeader