Commit 75f1dd8b authored by David Schulz's avatar David Schulz Committed by Eike Ziller

Core: check whether the patch tool defined in settings exist

Change-Id: I9b910ddfc9250b1d558bbe56c8cf82da056344ff
Reviewed-by: Oliver Wolff's avatarOliver Wolff <oliver.wolff@qt.io>
Reviewed-by: default avatarAndré Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: Riitta-Leena Miettinen's avatarLeena Miettinen <riitta-leena.miettinen@qt.io>
parent f84d44e4
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment