mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Changed: Delete installer files in TEMP directory after a reboot, see #279
This commit is contained in:
parent
0fc9667cb2
commit
a774636ebc
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