summaryrefslogtreecommitdiff
path: root/src/gui/updaterwindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-05-08 20:40:08 +0300
committerAndrei Karas <akaras@inbox.ru>2013-05-09 00:27:32 +0300
commit089a85eb5fbe48f309c1e472e6ca9d2239894b9d (patch)
treef8b48e3e648f7a5c389de510ce1c37d44e641a54 /src/gui/updaterwindow.cpp
parent8be61202c2994bd7075394ccc10c8b5190d3b203 (diff)
downloadmanaplus-089a85eb5fbe48f309c1e472e6ca9d2239894b9d.tar.gz
manaplus-089a85eb5fbe48f309c1e472e6ca9d2239894b9d.tar.bz2
manaplus-089a85eb5fbe48f309c1e472e6ca9d2239894b9d.tar.xz
manaplus-089a85eb5fbe48f309c1e472e6ca9d2239894b9d.zip
add version check in updates loading.
Diffstat (limited to 'src/gui/updaterwindow.cpp')
-rw-r--r--src/gui/updaterwindow.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp
index a614b7288..7ff7d6857 100644
--- a/src/gui/updaterwindow.cpp
+++ b/src/gui/updaterwindow.cpp
@@ -86,6 +86,20 @@ std::vector<UpdateFile> loadXMLFile(const std::string &fileName)
file.hash = XML::getProperty(fileNode, "hash", "");
file.type = XML::getProperty(fileNode, "type", "data");
file.desc = XML::getProperty(fileNode, "description", "");
+ const std::string version = XML::getProperty(
+ fileNode, "version", "");
+ if (!version.empty())
+ {
+ if (version > CHECK_VERSION)
+ continue;
+ }
+ const std::string notVersion = XML::getProperty(
+ fileNode, "notVersion", "");
+ if (!notVersion.empty())
+ {
+ if (notVersion <= CHECK_VERSION)
+ continue;
+ }
if (XML::getProperty(fileNode, "required", "yes") == "yes")
file.required = true;
else