From: Carl Hetherington Date: Tue, 2 Jul 2019 21:56:56 +0000 (+0100) Subject: Don't crash if history items are inaccessible. X-Git-Tag: v2.15.10~5 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=232ddcc9892a7dfd54efa7533c27c4cfdf71bffd Don't crash if history items are inaccessible. --- 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& h) vector 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 */ } } }