summaryrefslogtreecommitdiff
path: root/src/units.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/units.cpp
parent61e3fa8513c1bc2644348ac6052ab87785fb119d (diff)
downloadplus-9fe86d302838c62034c0bf6c74d8ca47722bd40b.tar.gz
plus-9fe86d302838c62034c0bf6c74d8ca47722bd40b.tar.bz2
plus-9fe86d302838c62034c0bf6c74d8ca47722bd40b.tar.xz
plus-9fe86d302838c62034c0bf6c74d8ca47722bd40b.zip
dehardcode client data configuration file names.
Now names stored in paths.xml
Diffstat (limited to 'src/units.cpp')
-rw-r--r--src/units.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/units.cpp b/src/units.cpp
index 93e051a89..957faa998 100644
--- a/src/units.cpp
+++ b/src/units.cpp
@@ -22,6 +22,7 @@
#include "units.h"
+#include "configuration.h"
#include "logger.h"
#include "utils/stringutils.h"
@@ -102,12 +103,13 @@ void Units::loadUnits()
units[UNIT_CURRENCY] = ud;
}
- XML::Document doc("units.xml");
+ XML::Document doc(paths.getStringValue("unitsFile"));
const XmlNodePtr root = doc.rootNode();
if (!root || !xmlNameEqual(root, "units"))
{
- logger->log1("Error loading unit definition file: units.xml");
+ logger->log("Error loading unit definition file: "
+ + paths.getStringValue("unitsFile"));
return;
}