Update OnlineUpdater.cpp

This commit is contained in:
DavidXanatos 2022-08-22 21:17:55 +02:00
parent 2d500776dc
commit 1061014add
1 changed files with 4 additions and 2 deletions

View File

@ -352,10 +352,12 @@ bool COnlineUpdater::IsVersionNewer(const QString& VersionStr)
void COnlineUpdater::CheckPendingUpdate()
{
QString VersionStr = theConf->GetString("Options/PendingUpdateVersion");
if (!IsVersionNewer(VersionStr)) {
bool bIsNewVersion = IsVersionNewer(VersionStr);
if (!bIsNewVersion)
theConf->DelValue("Options/PendingUpdateVersion");
QString FilePath = theConf->GetString("Options/PendingUpdatePackage");
if (!bIsNewVersion || !QFile::exists(FilePath))
theConf->DelValue("Options/PendingUpdatePackage");
}
}
void COnlineUpdater::DownloadUpdate()