From 7249b541277ac9b8bf4b04dd8df4a9def1e4da12 Mon Sep 17 00:00:00 2001 From: dongresource Date: Sat, 6 Nov 2021 06:01:14 +0100 Subject: [PATCH] Fix tdatadir and patchdir in config file requiring a terminating slash --- src/TableData.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/TableData.cpp b/src/TableData.cpp index bf60d04..f59acac 100644 --- a/src/TableData.cpp +++ b/src/TableData.cpp @@ -1073,12 +1073,12 @@ void TableData::init() { std::ifstream fstream; for (int i = 0; i < 7; i++) { std::pair& table = tables[i]; - fstream.open(settings::TDATADIR + 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 (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); } } @@ -1127,7 +1127,7 @@ void TableData::init() { * Write gruntwork output to file */ void TableData::flush() { - std::ofstream file(settings::TDATADIR + settings::GRUNTWORKJSON); + std::ofstream file(settings::TDATADIR + "/" + settings::GRUNTWORKJSON); json gruntwork; for (auto& pair : RunningSkywayRoutes) {