diff options
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | src/lib/config.cc | 8 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2013-12-18 Carl Hetherington <cth@carlh.net> + + * Hopefully fix exception on new film in some strange cases. + 2013-12-09 Carl Hetherington <cth@carlh.net> * Version 1.42 released. diff --git a/src/lib/config.cc b/src/lib/config.cc index 54b9168f2..ccbcdf7dd 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -353,7 +353,13 @@ Config::write () const boost::filesystem::path Config::default_directory_or (boost::filesystem::path a) const { - if (_default_directory.empty() || !boost::filesystem::exists (_default_directory)) { + if (_default_directory.empty()) { + return a; + } + + boost::system::error_code ec; + bool const e = boost::filesystem::exists (_default_directory, ec); + if (ec || !e) { return a; } |
