diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2018-12-30 16:27:43 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-30 16:27:43 -0600 |
| commit | b2ca83366a4794990b39bcc02861ae120d40cb09 (patch) | |
| tree | a646dbcfb20a1289179508649c7431036e06e85b /src/installationmanager.cpp | |
| parent | 4436d376a8d426867f217b03838570a424b09c5f (diff) | |
| parent | 71091f679dd1625b96e6d88d781a93fe6f14d210 (diff) | |
Merge pull request #601 from Project579/archive_conflicts_2
Archive conflicts Updating to Lastest Develop
Diffstat (limited to 'src/installationmanager.cpp')
| -rw-r--r-- | src/installationmanager.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 64e58358..76b1e086 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -677,7 +677,14 @@ void InstallationManager::postInstallCleanup() // TODO: this doesn't yet remove directories. Also, the files may be left there if this point isn't reached for (const QString &tempFile : m_TempFilesToDelete) { QFileInfo fileInfo(QDir::tempPath() + "/" + tempFile); - QFile::remove(fileInfo.absoluteFilePath()); + if (fileInfo.exists()) { + if (!fileInfo.isReadable() || !fileInfo.isWritable()) { + QFile::setPermissions(fileInfo.absoluteFilePath(), QFile::ReadOther | QFile::WriteOther); + } + if (!QFile::remove(fileInfo.absoluteFilePath())) { + qWarning() << "Unable to delete " << fileInfo.absoluteFilePath(); + } + } directoriesToRemove.insert(fileInfo.absolutePath()); } |
