mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-05 19:16:50 +08:00
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:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user