mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-18 03:14:06 +00:00
+! Prevent accidential index purging when the program is terminated
in some obsure way and the dictionary loading thread gets killed prematurely.
This commit is contained in:
parent
54efa23585
commit
8f23e83ac0
|
@ -28,7 +28,8 @@ using std::vector;
|
||||||
|
|
||||||
LoadDictionaries::LoadDictionaries( Config::Class const & cfg ):
|
LoadDictionaries::LoadDictionaries( Config::Class const & cfg ):
|
||||||
paths( cfg.paths ), soundDirs( cfg.soundDirs ), hunspell( cfg.hunspell ),
|
paths( cfg.paths ), soundDirs( cfg.soundDirs ), hunspell( cfg.hunspell ),
|
||||||
transliteration( cfg.transliteration )
|
transliteration( cfg.transliteration ),
|
||||||
|
exceptionText( "Load did not finish" ) // Will be cleared upon success
|
||||||
{
|
{
|
||||||
// Populate name filters
|
// Populate name filters
|
||||||
|
|
||||||
|
@ -60,6 +61,8 @@ void LoadDictionaries::run()
|
||||||
dictionaries.insert( dictionaries.end(), hunspellDictionaries.begin(),
|
dictionaries.insert( dictionaries.end(), hunspellDictionaries.begin(),
|
||||||
hunspellDictionaries.end() );
|
hunspellDictionaries.end() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
exceptionText.clear();
|
||||||
}
|
}
|
||||||
catch( std::exception & e )
|
catch( std::exception & e )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue