Update tdata to patch format, change config constants accordingly

This commit is contained in:
gsemaj
2021-05-01 20:49:54 -04:00
committed by Gent Semaj
parent b2a8b86e4c
commit 59303ba30d
5 changed files with 40 additions and 29 deletions

View File

@@ -998,12 +998,12 @@ void TableData::init() {
std::ifstream fstream;
for (int i = 0; i < 7; i++) {
std::pair<json*, std::string>& table = tables[i];
fstream.open(table.second); // open file
fstream.open(settings::TDATADIR + table.second); // open file
if (!fstream.fail()) {
fstream >> *table.first; // load file contents into table
} else {
if (i != 6) { // gruntwork isn't critical
std::cerr << "[FATAL] Critical tdata file missing: " << table.second << std::endl;
std::cerr << "[FATAL] Critical tdata file missing: " << settings::TDATADIR << table.second << std::endl;
exit(1);
}
}