projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c60f174
)
Fix failure to re-write bad configuration files caused by trying to check for a link...
author
Carl Hetherington
<cth@carlh.net>
Mon, 24 Dec 2018 23:55:29 +0000
(23:55 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 24 Dec 2018 23:55:29 +0000
(23:55 +0000)
src/lib/config.cc
patch
|
blob
|
history
diff --git
a/src/lib/config.cc
b/src/lib/config.cc
index e2f2bbeb97a81fff2ccbf19ae50798916394cd89..dbd0aea71e171bf755d861518cfe3354d7850ae7 100644
(file)
--- a/
src/lib/config.cc
+++ b/
src/lib/config.cc
@@
-970,10
+970,16
@@
Config::config_file ()
}
/* See if there's a link */
- f.read_file (main);
- optional<string> link = f.optional_string_child("Link");
- if (link) {
- return *link;
+ try {
+ f.read_file (main);
+ optional<string> link = f.optional_string_child("Link");
+ if (link) {
+ return *link;
+ }
+ } catch (xmlpp::exception& e) {
+ /* There as a problem reading the main configuration file,
+ so there can't be a link.
+ */
}
return main;