From 816e523fae05b4f476f209431ced3dfacafbb186 Mon Sep 17 00:00:00 2001 From: Abs62 Date: Fri, 25 Apr 2014 17:16:42 +0400 Subject: [PATCH] Fix removing of unused FTS index files in some special cases --- loaddictionaries.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/loaddictionaries.cc b/loaddictionaries.cc index 1f47c027..c4e43e28 100644 --- a/loaddictionaries.cc +++ b/loaddictionaries.cc @@ -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