From f49bdaec3f8ac93e8904c3b58aaee39c4dca90a4 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 6 Jan 2018 00:06:40 +0100 Subject: [PATCH] update: use fileType instead of a string to check for experimental image Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/72ad3eb2a129d4d8d9f6a5d82049655795c29a9f Author: vanhofen Date: 2018-01-06 (Sat, 06 Jan 2018) Origin message was: ------------------ - update: use fileType instead of a string to check for experimental image --- src/gui/update.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gui/update.cpp b/src/gui/update.cpp index 2944e9125..eae281852 100644 --- a/src/gui/update.cpp +++ b/src/gui/update.cpp @@ -412,18 +412,16 @@ bool CFlashUpdate::checkVersion4Update() versionInfo = new CFlashVersionInfo(newVersion);//Memory leak: versionInfo sprintf(msg, g_Locale->getText(msg_body), versionInfo->getDate(), versionInfo->getTime(), versionInfo->getReleaseCycle(), versionInfo->getType()); - if(fileType <= '2') + if (fileType <= '2') { if ((strncmp(RELEASE_CYCLE, versionInfo->getReleaseCycle(), 2) != 0) && (ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_FLASHUPDATE_WRONGBASE, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_UPDATE) != CMsgBox::mbrYes)) { delete versionInfo; - //ShowHint(LOCALE_MESSAGEBOX_ERROR, LOCALE_FLASHUPDATE_WRONGBASE); return false; } - if ((strcmp("Release", versionInfo->getType()) != 0) && - //(ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_FLASHUPDATE_EXPERIMENTALIMAGE, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_UPDATE) != CMsgBox::mbrYes)) + if ((fileType != '0' /*Release*/) && (ShowMsg(LOCALE_MESSAGEBOX_INFO, LOCALE_FLASHUPDATE_EXPERIMENTALIMAGE, CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NEUTRINO_ICON_UPDATE) != CMsgBox::mbrYes)) { delete versionInfo;