diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/config.cc | 8 | ||||
| -rw-r--r-- | src/lib/config.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index cec054aaa..4995793e9 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -269,7 +269,7 @@ Config::read () /** @return Filename to write configuration to */ boost::filesystem::path -Config::file () +Config::file (bool create_directories) { boost::filesystem::path p; #ifdef DCPOMATIC_OSX @@ -283,7 +283,9 @@ Config::file () p /= "dcpomatic2"; #endif boost::system::error_code ec; - boost::filesystem::create_directories (p, ec); + if (create_directories) { + boost::filesystem::create_directories (p, ec); + } p /= "config.xml"; return p; } @@ -468,5 +470,5 @@ Config::add_to_history (boost::filesystem::path p) bool Config::have_existing () { - return boost::filesystem::exists (file ()); + return boost::filesystem::exists (file (false)); } diff --git a/src/lib/config.h b/src/lib/config.h index 9d583ff6d..fc63c518c 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -432,7 +432,7 @@ public: private: Config (); - static boost::filesystem::path file (); + static boost::filesystem::path file (bool create_directories = true); void read (); void set_defaults (); void set_kdm_email_to_default (); |
