forked from markus/S_New4
v3.7.2: überprüfe die neuste Version nach download, wenn zumBeisiel html error in html steht
This commit is contained in:
parent
0414d3a8aa
commit
732b2d5940
@ -81,7 +81,7 @@ struct Settings {
|
|||||||
proxy_ip = "127.0.0.1",
|
proxy_ip = "127.0.0.1",
|
||||||
languages = "GerDub,GerSub,Eng,",
|
languages = "GerDub,GerSub,Eng,",
|
||||||
genaueHoster = "",
|
genaueHoster = "",
|
||||||
version = "3.7.1",
|
version = "3.7.2",
|
||||||
defaultFileVersion="1.6",
|
defaultFileVersion="1.6",
|
||||||
outputFilePath = "",
|
outputFilePath = "",
|
||||||
default_checkPath = "",
|
default_checkPath = "",
|
||||||
|
@ -1059,6 +1059,16 @@ int ProgramManager::updateModus(Settings *settings)
|
|||||||
std::string neusteVersion = html.substr(0, html.find("\n"));
|
std::string neusteVersion = html.substr(0, html.find("\n"));
|
||||||
html.erase(0, html.find("\n") + 1);
|
html.erase(0, html.find("\n") + 1);
|
||||||
|
|
||||||
|
//Überprüfe onb neue Version einen . enthält
|
||||||
|
if(neusteVersion.find(".") == std::string::npos) {
|
||||||
|
size_t pos;
|
||||||
|
if((pos = html.find("h1>")) != std::string::npos)
|
||||||
|
std::cout << " => Das herunterladen ist fehlgeschlagen: " << html.substr(pos + 3, html.find("</h1>") - pos);
|
||||||
|
else
|
||||||
|
std::cout << " => Error: Die neuste Version ist ungültig: '" << neusteVersion << "'." << std::endl;
|
||||||
|
return -3;
|
||||||
|
}
|
||||||
|
|
||||||
//Gib Versionenunterschie aus
|
//Gib Versionenunterschie aus
|
||||||
std::cout << " => INFO: Jetzige Version: '" << settings->version << "' - Neueste Version: '" << neusteVersion << "'" << std::endl;
|
std::cout << " => INFO: Jetzige Version: '" << settings->version << "' - Neueste Version: '" << neusteVersion << "'" << std::endl;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user