diff options
| author | Project579 <star579avatar@gmail.com> | 2018-12-29 11:56:42 +0100 |
|---|---|---|
| committer | Project579 <star579avatar@gmail.com> | 2018-12-29 11:56:42 +0100 |
| commit | d6f9e6d900f4a92da6bb252f0f8a223d59819e45 (patch) | |
| tree | 1e39b666e3d52632a471152630d2f07d4e73125d /src/installationmanager.cpp | |
| parent | 4436d376a8d426867f217b03838570a424b09c5f (diff) | |
| parent | eb50d0b44773f17fd8edccd557b7a2135c2cdb76 (diff) | |
Merge branch 'Develop' into archive_conflicts_2
Updating to 2.1.7alpha1
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()); } |
