update: fix check for installed version; equivalent to 68a2d57

Origin commit data
------------------
Branch: ni/coolstream
Commit: 3a4e207aaa
Author: vanhofen <vanhofen@gmx.de>
Date: 2018-01-12 (Fri, 12 Jan 2018)

Origin message was:
------------------
- update: fix check for installed version; equivalent to 68a2d57

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2018-01-12 11:31:55 +01:00
parent a3a6628bd8
commit c08971b83b

View File

@@ -167,11 +167,13 @@ bool CFlashUpdate::checkOnlineVersion()
std::vector<CUpdateMenuTarget*> update_t_list;
CConfigFile _configfile('\t');
const char * versionString = (_configfile.loadConfig(TARGET_PREFIX "/.version")) ? (_configfile.getString( "version", "????????????????").c_str()) : "????????????????";
std::string versionString = "????????????????";
if (_configfile.loadConfig(TARGET_PREFIX "/.version"))
versionString = _configfile.getString("version", "????????????????");
dprintf(DEBUG_NORMAL, "[update] file %s\n", g_settings.softupdate_url_file.c_str());
CFlashVersionInfo curInfo(versionString);
CFlashVersionInfo curInfo(versionString.c_str());
curVer = curInfo.getVersion();
dprintf(DEBUG_NORMAL, "[update] current flash-version: %s (%d) date %s (%ld)\n", versionString, curInfo.getVersion(), curInfo.getDate(), curInfo.getDateTime());
dprintf(DEBUG_NORMAL, "[update] current flash-version: %s (%d) date %s (%ld)\n", versionString.c_str(), curInfo.getVersion(), curInfo.getDate(), curInfo.getDateTime());
std::ifstream urlFile(g_settings.softupdate_url_file.c_str());
if (urlFile >> url) {