+! 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:
Konstantin Isakov 2009-08-31 12:58:29 +00:00
parent 54efa23585
commit 8f23e83ac0

View file

@ -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 )
{ {