diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-07-02 22:56:56 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-07-02 22:56:56 +0100 |
| commit | 232ddcc9892a7dfd54efa7533c27c4cfdf71bffd (patch) | |
| tree | cee16d57a20f1255f6a1faf28d83d9e969789400 | |
| parent | e6c828cbd577239e7c8e4c532161084a33843a0f (diff) | |
Don't crash if history items are inaccessible.
| -rw-r--r-- | src/lib/config.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index a7a457081..1d2ef1e40 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -1230,8 +1230,12 @@ Config::clean_history_internal (vector<boost::filesystem::path>& h) vector<boost::filesystem::path> old = h; h.clear (); BOOST_FOREACH (boost::filesystem::path i, old) { - if (boost::filesystem::is_directory(i)) { - h.push_back (i); + try { + if (boost::filesystem::is_directory(i)) { + h.push_back (i); + } + } catch (...) { + /* We couldn't find out if it's a directory for some reason; just ignore it */ } } } |
