| 192 | } |
| 193 | |
| 194 | bool TextDB::open_db() |
| 195 | { |
| 196 | if (_db) |
| 197 | return true; |
| 198 | |
| 199 | const string full_db_path = _db_cache_path(_db_name, lang()); |
| 200 | _db = dbm_open(full_db_path.c_str(), O_RDONLY, 0660); |
| 201 | if (!_db) |
| 202 | return false; |
| 203 | |
| 204 | timestamp = _query_database(*this, "TIMESTAMP", false, false, true); |
| 205 | if (timestamp.empty()) |
| 206 | return false; |
| 207 | |
| 208 | return true; |
| 209 | } |
| 210 | |
| 211 | void TextDB::init() |
| 212 | { |
nothing calls this directly
no test coverage detected