summaryrefslogtreecommitdiff
path: root/src/lib/config.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-08-11 01:36:05 +0100
committerCarl Hetherington <cth@carlh.net>2015-08-11 19:39:04 +0100
commitb75b2a81c24716e21442178b77ee0276ddff843c (patch)
tree3e090cb6b27eba4afc113fc211c6efdb0cfbcc1b /src/lib/config.cc
parenta983627b357e25478a524a20cafa4a68a4b9299f (diff)
Show a splash screen if config needs creating.
Diffstat (limited to 'src/lib/config.cc')
-rw-r--r--src/lib/config.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index f71fff86c..cc62bfed3 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -119,7 +119,7 @@ Config::restore_defaults ()
void
Config::read ()
{
- if (!boost::filesystem::exists (file ())) {
+ if (!have_existing ()) {
/* Make a new set of signing certificates and key */
_signer_chain.reset (new dcp::CertificateChain (openssl_path ()));
/* And similar for decryption of KDMs */
@@ -263,7 +263,7 @@ Config::read ()
/** @return Filename to write configuration to */
boost::filesystem::path
-Config::file () const
+Config::file ()
{
boost::filesystem::path p;
#ifdef DCPOMATIC_OSX
@@ -456,3 +456,9 @@ Config::add_to_history (boost::filesystem::path p)
changed ();
}
+
+bool
+Config::have_existing ()
+{
+ return boost::filesystem::exists (file ());
+}