projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f915e64
)
Don't crash if history items are inaccessible.
author
Carl Hetherington
<cth@carlh.net>
Tue, 2 Jul 2019 21:56:56 +0000
(22:56 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 2 Jul 2019 22:23:56 +0000
(23:23 +0100)
Backported from
232ddcc9892a7dfd54efa7533c27c4cfdf71bffd
in v2.15.x.
src/lib/config.cc
patch
|
blob
|
history
diff --git
a/src/lib/config.cc
b/src/lib/config.cc
index 4ce4517f8088fbac0e89087925f5d300a3969942..a4dea7fd1abb49926a3b709b3f90f1e0bc45209a 100644
(file)
--- a/
src/lib/config.cc
+++ b/
src/lib/config.cc
@@
-1215,8
+1215,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 */
}
}
}