| 209 | } |
| 210 | |
| 211 | void TextDB::init() |
| 212 | { |
| 213 | if (Options.lang_name && !_parent) |
| 214 | { |
| 215 | translation = new TextDB(this); |
| 216 | translation->init(); |
| 217 | } |
| 218 | |
| 219 | open_db(); |
| 220 | |
| 221 | if (!_needs_update()) |
| 222 | return; |
| 223 | _regenerate_db(); |
| 224 | |
| 225 | if (!open_db()) |
| 226 | { |
| 227 | end(1, true, "Failed to open DB: %s", |
| 228 | _db_cache_path(_db_name, lang()).c_str()); |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | void TextDB::shutdown(bool recursive) |
| 233 | { |
no test coverage detected