diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-12-18 10:45:24 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-12-18 10:45:24 +0000 |
| commit | e0c59417c6a52dbd853114fbc0f88c6d8c1dd276 (patch) | |
| tree | 5a115a2ac16150b73b9054467b82e2e42c384c9a /src | |
| parent | 2d69b8e42c2c69980c214212923fd985a4362cff (diff) | |
| parent | 03b54137dc7b35594a38f5d2bbe702d3876544f7 (diff) | |
Merge branch '1.0' into 1.0-seek
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/config.cc | 8 |
1 files changed, 7 insertions, 1 deletions
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; } |
