mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-22 23:06:18 +00:00
Changed: Delete installer files in TEMP directory after a reboot, see #279
This commit is contained in:
parent
1b3c882d3a
commit
b308063431
1 changed files with 16 additions and 3 deletions
|
@ -1118,8 +1118,6 @@ void COperationDialog::deleteComponentsInstaller()
|
|||
|
||||
CConfigFile *config = CConfigFile::getInstance();
|
||||
|
||||
// TODO: delete installer
|
||||
|
||||
deleteAddRemoveEntry();
|
||||
|
||||
// delete menu
|
||||
|
@ -1132,7 +1130,22 @@ void COperationDialog::deleteComponentsInstaller()
|
|||
dir.removeRecursively();
|
||||
}
|
||||
|
||||
// TODO:
|
||||
path = config->getInstallerFullPath();
|
||||
QStringList files = config->getInstallerRequiredFiles();
|
||||
|
||||
foreach(const QString &file, files)
|
||||
{
|
||||
QString fullPath = path + "/" + file;
|
||||
|
||||
// delete file
|
||||
if (!QFile::remove(fullPath))
|
||||
{
|
||||
#ifdef Q_OS_WIN32
|
||||
// under Windows, a running executable is locked, so we need to delete it later
|
||||
MoveFileExW(qToWide(QDir::toNativeSeparators(fullPath)), NULL, MOVEFILE_DELAY_UNTIL_REBOOT);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// reset it once it's done
|
||||
m_removeComponents.installer = false;
|
||||
|
|
Loading…
Reference in a new issue