summaryrefslogtreecommitdiff
path: root/src/resources/db/moddb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/db/moddb.cpp')
-rw-r--r--src/resources/db/moddb.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/resources/db/moddb.cpp b/src/resources/db/moddb.cpp
index c76bb8352..a03461d32 100644
--- a/src/resources/db/moddb.cpp
+++ b/src/resources/db/moddb.cpp
@@ -42,15 +42,16 @@ void ModDB::load()
{
if (mLoaded)
unload();
- loadXmlFile(paths.getStringValue("modsFile"));
- loadXmlFile(paths.getStringValue("modsPatchFile"));
+ loadXmlFile(paths.getStringValue("modsFile"), SkipError_false);
+ loadXmlFile(paths.getStringValue("modsPatchFile"), SkipError_true);
loadXmlDir("modsPatchDir", loadXmlFile);
mLoaded = true;
}
-void ModDB::loadXmlFile(const std::string &fileName)
+void ModDB::loadXmlFile(const std::string &fileName,
+ const SkipError skipError)
{
- XML::Document doc(fileName, UseResman_true, SkipError_false);
+ XML::Document doc(fileName, UseResman_true, skipError);
const XmlNodePtrConst rootNode = doc.rootNode();
if (!rootNode || !xmlNameEqual(rootNode, "mods"))
@@ -66,7 +67,7 @@ void ModDB::loadXmlFile(const std::string &fileName)
{
const std::string name = XML::getProperty(modNode, "name", "");
if (!name.empty())
- loadXmlFile(name);
+ loadXmlFile(name, skipError);
continue;
}