summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKatja Marttila <katja.marttila@qt.io>2017-05-05 15:03:03 +0300
committerKatja Marttila <katja.marttila@qt.io>2017-05-10 06:02:27 +0000
commit3fdc5bd4b1a1f75496bd453b12dd01c662782958 (patch)
tree8de0a877e8332797e29fa62ddc5693e6b51ef4ef /src
parentbb671cba0a2ffcb0f165d373a51b76a57a7dfacc (diff)
Give warning and exit install if invalid URL given for 7z repository
Task-number: QTIFW-966 Change-Id: I13cf001771d30e0737348d33183e329e4c1d2070 Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/sdk/installerbase.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sdk/installerbase.cpp b/src/sdk/installerbase.cpp
index 637a20f45..e09e651a2 100644
--- a/src/sdk/installerbase.cpp
+++ b/src/sdk/installerbase.cpp
@@ -217,6 +217,12 @@ int InstallerBase::run()
.value(QLatin1String(CommandLineOptions::InstallCompressedRepository)));
if (repoList.isEmpty())
throw QInstaller::Error(QLatin1String("Empty repository list for option 'installCompressedRepository'."));
+ foreach (QString repository, repoList) {
+ if (!QFileInfo::exists(repository)) {
+ qDebug() << "The file " << repository << "does not exist.";
+ return EXIT_FAILURE;
+ }
+ }
m_core->setTemporaryRepositories(repoList, false, true);
}