forked from qt-creator/qt-creator
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>
This commit is contained in:
committed by
Eike Ziller
parent
f84d44e4e8
commit
75f1dd8b9c
@@ -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);
|
||||
|
Reference in New Issue
Block a user