diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-09-09 21:03:41 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-09-09 21:03:41 +0100 |
| commit | 49bc86b1321c765a71eb9ef73863fc00345f571c (patch) | |
| tree | beb412b988902b92ddbe5fe5cf689cf6915bb512 /src | |
| parent | b79568988f73c2580c46060287432151857abef9 (diff) | |
Use dcpomatic2 for config files (for now, at least) and remove old .dvdomatic option.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/config.cc | 18 | ||||
| -rw-r--r-- | src/lib/config.h | 2 |
2 files changed, 8 insertions, 12 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index 114fc5c27..d624e6070 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -94,7 +94,7 @@ Config::Config () void Config::read () { - if (!boost::filesystem::exists (file (false))) { + if (!boost::filesystem::exists (file ())) { /* Make a new set of signing certificates and key */ _signer.reset (new dcp::Signer (openssl_path ())); /* And decryption keys */ @@ -103,7 +103,7 @@ Config::read () } cxml::Document f ("Config"); - f.read_file (file (false)); + f.read_file (file ()); optional<string> c; optional<int> version = f.optional_number_child<int> ("Version"); @@ -265,19 +265,15 @@ Config::make_decryption_keys () /** @return Filename to write configuration to */ boost::filesystem::path -Config::file (bool old) const +Config::file () const { boost::filesystem::path p; p /= g_get_user_config_dir (); boost::system::error_code ec; boost::filesystem::create_directory (p, ec); - if (old) { - p /= ".dvdomatic"; - } else { - p /= "dcpomatic"; - boost::filesystem::create_directory (p, ec); - p /= "config.xml"; - } + p /= "dcpomatic2"; + boost::filesystem::create_directory (p, ec); + p /= "config.xml"; return p; } @@ -382,7 +378,7 @@ Config::write () const root->add_child("History")->add_child_text (i->string ()); } - doc.write_to_file_formatted (file(false).string ()); + doc.write_to_file_formatted (file().string ()); } boost::filesystem::path diff --git a/src/lib/config.h b/src/lib/config.h index 99b3eb621..3cc7c49c4 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -435,7 +435,7 @@ public: private: Config (); - boost::filesystem::path file (bool) const; + boost::filesystem::path file () const; void read (); void write () const; void make_decryption_keys (); |
