summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libs/installer/extractarchiveoperation.cpp8
-rw-r--r--src/libs/installer/licenseoperation.cpp4
2 files changed, 9 insertions, 3 deletions
diff --git a/src/libs/installer/extractarchiveoperation.cpp b/src/libs/installer/extractarchiveoperation.cpp
index 63e560e79..99dd88a7e 100644
--- a/src/libs/installer/extractarchiveoperation.cpp
+++ b/src/libs/installer/extractarchiveoperation.cpp
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
@@ -122,7 +122,8 @@ bool ExtractArchiveOperation::performOperation()
QStringList files = callback.extractedFiles();
- QString fileDirectory = targetDir + QLatin1String("/installerResources/") +
+ const QString resourcesPath = targetDir + QLatin1Char('/') + QLatin1String("installerResources");
+ QString fileDirectory = resourcesPath + QLatin1Char('/') +
archivePath.section(QLatin1Char('/'), 1, 1, QString::SectionSkipEmpty) + QLatin1Char('/');
QString archiveFileName = archivePath.section(QLatin1Char('/'), 2, 2, QString::SectionSkipEmpty);
QFileInfo fileInfo2(archiveFileName);
@@ -136,6 +137,9 @@ bool ExtractArchiveOperation::performOperation()
if (!dir.exists()) {
dir.mkpath(targetDirectoryInfo.absolutePath());
}
+ setDefaultFilePermissions(resourcesPath, DefaultFilePermissions::Executable);
+ setDefaultFilePermissions(targetDirectoryInfo.absolutePath(), DefaultFilePermissions::Executable);
+
QFile file(targetDirectoryInfo.absolutePath() + QLatin1Char('/') + fileName);
if (file.open(QIODevice::WriteOnly)) {
setDefaultFilePermissions(file.fileName(), DefaultFilePermissions::NonExecutable);
diff --git a/src/libs/installer/licenseoperation.cpp b/src/libs/installer/licenseoperation.cpp
index 7296c6606..a5a61c71f 100644
--- a/src/libs/installer/licenseoperation.cpp
+++ b/src/libs/installer/licenseoperation.cpp
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Installer Framework.
@@ -30,6 +30,7 @@
#include "packagemanagercore.h"
#include "settings.h"
+#include "fileutils.h"
#include <QtCore/QDir>
#include <QtCore/QFile>
@@ -74,6 +75,7 @@ bool LicenseOperation::performOperation()
QDir dir;
dir.mkpath(targetDir);
+ setDefaultFilePermissions(targetDir, DefaultFilePermissions::Executable);
setArguments(QStringList(targetDir));
for (QVariantMap::const_iterator it = licenses.constBegin(); it != licenses.constEnd(); ++it) {