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

Core: check whether the patch tool defined in settings exist

Change-Id: I9b910ddfc9250b1d558bbe56c8cf82da056344ff
Reviewed-by: Oliver Wolff's avatarOliver Wolff <>
Reviewed-by: default avatarAndré Hartmann <>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <>
Reviewed-by: Riitta-Leena Miettinen's avatarLeena Miettinen <>
parent f84d44e4
...@@ -88,6 +88,12 @@ static bool runPatchHelper(const QByteArray &input, const QString &workingDirect ...@@ -88,6 +88,12 @@ static bool runPatchHelper(const QByteArray &input, const QString &workingDirect
return false; 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; QProcess patchProcess;
if (!workingDirectory.isEmpty()) if (!workingDirectory.isEmpty())
patchProcess.setWorkingDirectory(workingDirectory); 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