Make sure the updatesAvailable flag does not get saved if there was a network error during the check,

This commit is contained in:
Ken Moore
2017-01-17 09:49:26 -05:00
parent 60748d1029
commit efb78c9627

View File

@@ -80,7 +80,9 @@ QJsonObject Update::checkUpdates(bool fast) {
//qDebug() << " - Run full check";
//output = General::RunCommand("pc-updatemanager check").split("\n");
output.append( General::RunCommand("pc-updatemanager pkgcheck").split("\n") );
General::writeTextFile(UP_UPFILE, output); //save this check for later "fast" updates
if(!output.last().contains("ERROR:")){ //make sure there was network access available first - otherwise let it try again soon
General::writeTextFile(UP_UPFILE, output); //save this check for later "fast" updates
}
}
//qDebug() << "pc-updatemanager checks:" << output;