From 5712f63b8ef2243ddc98245e923fcb7123552c4d Mon Sep 17 00:00:00 2001 From: YiFang Xiao Date: Fri, 14 Jun 2024 22:52:15 +0800 Subject: [PATCH] fix: slob truncated file check. fix #1541 --- src/dict/slob.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/dict/slob.cc b/src/dict/slob.cc index c0a6ebe8..3b73508b 100644 --- a/src/dict/slob.cc +++ b/src/dict/slob.cc @@ -678,14 +678,7 @@ SlobDictionary::SlobDictionary( string const & id, string const & indexFile, vec idxHeader( idx.read< IdxHeader >() ) { // Open data file - - try { - sf.open( dictionaryFiles[ 0 ].c_str() ); - } - catch ( std::exception & e ) { - gdWarning( "Slob dictionary initializing failed: %s, error: %s\n", dictionaryFiles[ 0 ].c_str(), e.what() ); - return; - } + sf.open( dictionaryFiles[ 0 ].c_str() ); // Initialize the indexes