Woops, fixes and defines. :P

This commit is contained in:
StackZ
2020-11-07 10:52:08 +01:00
parent ee2769b294
commit 0dc8369bff
6 changed files with 32 additions and 12 deletions
+4 -4
View File
@@ -582,9 +582,9 @@ bool DownloadUniStore(const std::string &URL, int currentRev, std::string &fl, b
nlohmann::json parsedAPI = nlohmann::json::parse(result_buf);
if (parsedAPI.contains("storeInfo") && parsedAPI.contains("storeContent")) {
/* Ensure, version == 3. */
/* Ensure, version == _UNISTORE_VERSION. */
if (parsedAPI["storeInfo"].contains("version") && parsedAPI["storeInfo"]["version"].is_number()) {
if (parsedAPI["storeInfo"]["version"] == 3) {
if (parsedAPI["storeInfo"]["version"] == _UNISTORE_VERSION) {
if (currentRev > -1) {
if (parsedAPI["storeInfo"].contains("revision") && parsedAPI["storeInfo"]["revision"].is_number()) {
@@ -644,10 +644,10 @@ bool DownloadUniStore(const std::string &URL, int currentRev, std::string &fl, b
}
}
} else if (parsedAPI["storeInfo"]["version"] < 3) {
} else if (parsedAPI["storeInfo"]["version"] < _UNISTORE_VERSION) {
Msg::waitMsg(Lang::get("UNISTORE_TOO_OLD"));
} else if (parsedAPI["storeInfo"]["version"] > 3) {
} else if (parsedAPI["storeInfo"]["version"] > _UNISTORE_VERSION) {
Msg::waitMsg(Lang::get("UNISTORE_TOO_NEW"));
}