Changed: Delete installer files in TEMP directory after a reboot, see #279
--HG-- branch : develop
This commit is contained in:
parent
626eba195d
commit
419131091c
1 changed files with 16 additions and 3 deletions
|
@ -1118,8 +1118,6 @@ void COperationDialog::deleteComponentsInstaller()
|
||||||
|
|
||||||
CConfigFile *config = CConfigFile::getInstance();
|
CConfigFile *config = CConfigFile::getInstance();
|
||||||
|
|
||||||
// TODO: delete installer
|
|
||||||
|
|
||||||
deleteAddRemoveEntry();
|
deleteAddRemoveEntry();
|
||||||
|
|
||||||
// delete menu
|
// delete menu
|
||||||
|
@ -1132,7 +1130,22 @@ void COperationDialog::deleteComponentsInstaller()
|
||||||
dir.removeRecursively();
|
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
|
// reset it once it's done
|
||||||
m_removeComponents.installer = false;
|
m_removeComponents.installer = false;
|
||||||
|
|
Loading…
Reference in a new issue