Added runtime data dir parameter

just in case it's not possible to configure the runtime directory via config file (i.e., if the location is only known at runtime)
This commit is contained in:
Matt Hill
2014-05-19 19:41:48 -05:00
parent 0e1d0aae8b
commit be061ad452
6 changed files with 13 additions and 8 deletions

View File

@@ -20,7 +20,7 @@
#include "config.h"
Config::Config(const std::string country, const std::string config_file)
Config::Config(const std::string country, const std::string config_file, const std::string runtime_dir)
{
string debug_message = "";
@@ -76,6 +76,11 @@ Config::Config(const std::string country, const std::string config_file)
loadValues(country);
if (runtime_dir.compare("") != 0)
{
// User provided a runtime directory directly into the library. Use this.
this->runtimeBaseDir = runtime_dir;
}
if (DirectoryExists(this->runtimeBaseDir.c_str()) == false)
{