diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/config.cc | 11 | ||||
| -rw-r--r-- | src/lib/config.h | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index b6f464717..3beb0aea6 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -61,7 +61,11 @@ Config::Config () _allowed_dcp_frame_rates.push_back (48); _allowed_dcp_frame_rates.push_back (50); _allowed_dcp_frame_rates.push_back (60); +} +void +Config::read () +{ if (!boost::filesystem::exists (file (false))) { read_old_metadata (); return; @@ -199,6 +203,13 @@ Config::instance () { if (_instance == 0) { _instance = new Config; + try { + _instance->read (); + } catch (...) { + /* configuration load failed; never mind, just + stick with the default. + */ + } } return _instance; diff --git a/src/lib/config.h b/src/lib/config.h index 05005e590..96aa4e449 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -213,6 +213,7 @@ public: private: Config (); std::string file (bool) const; + void read (); void read_old_metadata (); /** number of threads to use for J2K encoding on the local machine */ |
