summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-12-18 10:45:24 +0000
committerCarl Hetherington <cth@carlh.net>2013-12-18 10:45:24 +0000
commite0c59417c6a52dbd853114fbc0f88c6d8c1dd276 (patch)
tree5a115a2ac16150b73b9054467b82e2e42c384c9a
parent2d69b8e42c2c69980c214212923fd985a4362cff (diff)
parent03b54137dc7b35594a38f5d2bbe702d3876544f7 (diff)
Merge branch '1.0' into 1.0-seek
-rw-r--r--ChangeLog4
-rw-r--r--src/lib/config.cc8
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e3f258c8..1f3097c87 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;
}