mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 08:34:08 +00:00
Fix removing of unused FTS index files in some special cases
This commit is contained in:
parent
488286a75f
commit
816e523fae
|
@ -348,12 +348,14 @@ void loadDictionaries( QWidget * parent, bool showInitially,
|
||||||
for( QStringList::const_iterator i = allIdxFiles.constBegin();
|
for( QStringList::const_iterator i = allIdxFiles.constBegin();
|
||||||
i != allIdxFiles.constEnd(); ++i )
|
i != allIdxFiles.constEnd(); ++i )
|
||||||
{
|
{
|
||||||
if ( ids.find( FsEncoding::encode( *i ) ) == ids.end() &&
|
if ( ids.find( FsEncoding::encode( *i ) ) == ids.end()
|
||||||
i->size() == 32 )
|
&& 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 );
|
||||||
indexDir.remove( *i + "_FTS" );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run deferred inits
|
// Run deferred inits
|
||||||
|
|
Loading…
Reference in a new issue