forked from qt-creator/qt-creator
Drop QFileInfo::exists() check before trying to run an executable
Physical existence of a file is not strictly needed for something being runnable, e.g. 'foo' can be used to start a process on windows, even when only 'foo.exe', but not 'foo' itself exists. On the other hand, the existence of the file is not sufficient either to run it, so the check was too weak and too strict at the same time. Change-Id: I4a41d2f5cbb0cb471023a8bc23628072b28a5984 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -1572,9 +1572,6 @@ void SimpleTargetRunner::start()
|
|||||||
const QString executable = m_runnable.as<StandardRunnable>().executable;
|
const QString executable = m_runnable.as<StandardRunnable>().executable;
|
||||||
if (executable.isEmpty()) {
|
if (executable.isEmpty()) {
|
||||||
reportFailure(RunControl::tr("No executable specified."));
|
reportFailure(RunControl::tr("No executable specified."));
|
||||||
} else if (!QFileInfo::exists(executable)) {
|
|
||||||
reportFailure(RunControl::tr("Executable %1 does not exist.")
|
|
||||||
.arg(QDir::toNativeSeparators(executable)));
|
|
||||||
} else {
|
} else {
|
||||||
m_launcher.start(m_runnable);
|
m_launcher.start(m_runnable);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user