mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 05:20:05 +00:00
Fix tdatadir and patchdir in config file requiring a terminating slash
This commit is contained in:
parent
4fa18a9642
commit
7249b54127
@ -1073,12 +1073,12 @@ void TableData::init() {
|
|||||||
std::ifstream fstream;
|
std::ifstream fstream;
|
||||||
for (int i = 0; i < 7; i++) {
|
for (int i = 0; i < 7; i++) {
|
||||||
std::pair<json*, std::string>& table = tables[i];
|
std::pair<json*, std::string>& table = tables[i];
|
||||||
fstream.open(settings::TDATADIR + table.second); // open file
|
fstream.open(settings::TDATADIR + "/" + table.second); // open file
|
||||||
if (!fstream.fail()) {
|
if (!fstream.fail()) {
|
||||||
fstream >> *table.first; // load file contents into table
|
fstream >> *table.first; // load file contents into table
|
||||||
} else {
|
} else {
|
||||||
if (table.first != &gruntwork) { // gruntwork isn't critical
|
if (table.first != &gruntwork) { // gruntwork isn't critical
|
||||||
std::cerr << "[FATAL] Critical tdata file missing: " << settings::TDATADIR << table.second << std::endl;
|
std::cerr << "[FATAL] Critical tdata file missing: " << table.second << std::endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1127,7 +1127,7 @@ void TableData::init() {
|
|||||||
* Write gruntwork output to file
|
* Write gruntwork output to file
|
||||||
*/
|
*/
|
||||||
void TableData::flush() {
|
void TableData::flush() {
|
||||||
std::ofstream file(settings::TDATADIR + settings::GRUNTWORKJSON);
|
std::ofstream file(settings::TDATADIR + "/" + settings::GRUNTWORKJSON);
|
||||||
json gruntwork;
|
json gruntwork;
|
||||||
|
|
||||||
for (auto& pair : RunningSkywayRoutes) {
|
for (auto& pair : RunningSkywayRoutes) {
|
||||||
|
Loading…
Reference in New Issue
Block a user