Commit 85f39584 authored by Leander Schulten's avatar Leander Schulten
Browse files

If an old WindowsInstaller.exe exists we should remove that

parent 18d7aa44
Pipeline #144155 passed with stage
in 1 minute and 14 seconds
......@@ -116,7 +116,16 @@ void Updater::update(){
return;
}
deployPath = QFileInfo(*deploy).absolutePath() + "/" + NAME_OF_DEPLOY_FOLDER;
if(!QFile::rename(deployPath + "/" + WINDOWS_INSTALLER_NAME,QFileInfo(*deploy).absolutePath() + "/" + WINDOWS_INSTALLER_NAME)){
// if old installer exists, delete these
QString targetInstallerPath = QFileInfo(*deploy).absolutePath() + "/" + WINDOWS_INSTALLER_NAME;
if(QFile::exists(targetInstallerPath)){
if(!QFile::remove(targetInstallerPath)){
qWarning() << "Failed to remove old Windows Installer";
state = UpdaterState::DownloadUpdateFailed;
return;
}
}
if(!QFile::rename(deployPath + "/" + WINDOWS_INSTALLER_NAME,targetInstallerPath)){
qWarning() << "Failed to rename Windows Installer";
state = UpdaterState::DownloadUpdateFailed;
return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment