Skip to content
Snippets Groups Projects
Commit a087b138 authored by dt's avatar dt
Browse files

Fixes: Make searchInPath() more robust.

Details:  returns the argument if it is absolute and already exists.
parent c6c39d6f
No related branches found
No related tags found
No related merge requests found
......@@ -188,6 +188,9 @@ QString Environment::searchInPath(QString executable)
// qDebug()<<"looking for "<<executable<< "in PATH: "<<m_values.value("PATH");
if (executable.isEmpty())
return QString::null;
QFileInfo fi(executable);
if (fi.isAbsolute() && fi.exists())
return executable;
#ifdef Q_OS_WIN
if (!executable.endsWith(QLatin1String(".exe")))
executable.append(QLatin1String(".exe"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment