diff options
author | David Schulz <david.schulz@qt.io> | 2017-07-27 11:14:55 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2017-09-12 07:34:07 +0000 |
commit | 75f1dd8b9c4b05528496720f83c2fe7e17ffddd0 (patch) | |
tree | ee9bc53ea656b9ff73cecbd1383387503e297acf /src/plugins/coreplugin/patchtool.cpp | |
parent | f84d44e4e886bedbb80dcde1d8ca021d3c026eb3 (diff) |
Core: check whether the patch tool defined in settings exist
Change-Id: I9b910ddfc9250b1d558bbe56c8cf82da056344ff
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/patchtool.cpp')
-rw-r--r-- | src/plugins/coreplugin/patchtool.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/patchtool.cpp b/src/plugins/coreplugin/patchtool.cpp index 10a48817def..724fabd1335 100644 --- a/src/plugins/coreplugin/patchtool.cpp +++ b/src/plugins/coreplugin/patchtool.cpp @@ -88,6 +88,12 @@ static bool runPatchHelper(const QByteArray &input, const QString &workingDirect return false; } + if (!Utils::FileName::fromString(patch).exists() + && !Utils::Environment::systemEnvironment().searchInPath(patch).exists()) { + MessageManager::write(QApplication::translate("Core::PatchTool", "The patch-command configured in the general \"Environment\" settings does not exist.")); + return false; + } + QProcess patchProcess; if (!workingDirectory.isEmpty()) patchProcess.setWorkingDirectory(workingDirectory); |