Fix removing of unused FTS index files in some special cases

This commit is contained in:
Abs62 2014-04-25 17:16:42 +04:00
parent 488286a75f
commit 816e523fae

View file

@ -348,12 +348,14 @@ void loadDictionaries( QWidget * parent, bool showInitially,
for( QStringList::const_iterator i = allIdxFiles.constBegin();
i != allIdxFiles.constEnd(); ++i )
{
if ( ids.find( FsEncoding::encode( *i ) ) == ids.end() &&
i->size() == 32 )
{
if ( ids.find( FsEncoding::encode( *i ) ) == ids.end()
&& i->size() == 32 )
indexDir.remove( *i );
else
if ( i->endsWith( "_FTS" )
&& i->size() == 36
&& ids.find( FsEncoding::encode( i->left( 32 ) ) ) == ids.end() )
indexDir.remove( *i );
indexDir.remove( *i + "_FTS" );
}
}
// Run deferred inits