summaryrefslogtreecommitdiff
path: root/src/resources/petdb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-26 15:47:39 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-26 15:47:39 +0300
commit9fe86d302838c62034c0bf6c74d8ca47722bd40b (patch)
tree58aa24b936547f3489788d5afb1045c89d5029fa /src/resources/petdb.cpp
parent61e3fa8513c1bc2644348ac6052ab87785fb119d (diff)
downloadmv-9fe86d302838c62034c0bf6c74d8ca47722bd40b.tar.gz
mv-9fe86d302838c62034c0bf6c74d8ca47722bd40b.tar.bz2
mv-9fe86d302838c62034c0bf6c74d8ca47722bd40b.tar.xz
mv-9fe86d302838c62034c0bf6c74d8ca47722bd40b.zip
dehardcode client data configuration file names.
Now names stored in paths.xml
Diffstat (limited to 'src/resources/petdb.cpp')
-rw-r--r--src/resources/petdb.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/resources/petdb.cpp b/src/resources/petdb.cpp
index 055779d9d..806e20e72 100644
--- a/src/resources/petdb.cpp
+++ b/src/resources/petdb.cpp
@@ -46,12 +46,13 @@ void PETDB::load()
logger->log1("Initializing PET database...");
- XML::Document doc("pets.xml");
+ XML::Document doc(paths.getStringValue("petsFile"));
const XmlNodePtr rootNode = doc.rootNode();
if (!rootNode || !xmlNameEqual(rootNode, "pets"))
{
- logger->log1("PET Database: Error while loading pets.xml!");
+ logger->log("PET Database: Error while loading %s!",
+ paths.getStringValue("petsFile").c_str());
mLoaded = true;
return;
}
@@ -65,7 +66,8 @@ void PETDB::load()
const int id = XML::getProperty(petNode, "id", 0);
if (id == 0)
{
- logger->log1("PET Database: PET with missing ID in pets.xml!");
+ logger->log("PET Database: PET with missing ID in %s!",
+ paths.getStringValue("petsFile").c_str());
continue;
}