From 8f23e83ac0fdff47931f32d1ceb5d4d3061e45c4 Mon Sep 17 00:00:00 2001 From: Konstantin Isakov Date: Mon, 31 Aug 2009 12:58:29 +0000 Subject: [PATCH] +! Prevent accidential index purging when the program is terminated in some obsure way and the dictionary loading thread gets killed prematurely. --- src/loaddictionaries.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/loaddictionaries.cc b/src/loaddictionaries.cc index de884717..3ce2af7b 100644 --- a/src/loaddictionaries.cc +++ b/src/loaddictionaries.cc @@ -28,7 +28,8 @@ using std::vector; LoadDictionaries::LoadDictionaries( Config::Class const & cfg ): 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 @@ -60,6 +61,8 @@ void LoadDictionaries::run() dictionaries.insert( dictionaries.end(), hunspellDictionaries.begin(), hunspellDictionaries.end() ); } + + exceptionText.clear(); } catch( std::exception & e ) {