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

Utils::Environment::searchInPath do not return directories

Task-Nr: QTCREATORBUG-3736
Reviewed-By: Friedemann Kleint
parent 04f991d7
No related branches found
No related tags found
No related merge requests found
...@@ -232,7 +232,7 @@ QString Environment::searchInPath(const QStringList &executables, ...@@ -232,7 +232,7 @@ QString Environment::searchInPath(const QStringList &executables,
fp += slash; fp += slash;
fp += exec; fp += exec;
const QFileInfo fi(fp); const QFileInfo fi(fp);
if (fi.exists()) if (fi.exists() && fi.isExecutable() && !fi.isDir())
return fi.absoluteFilePath(); return fi.absoluteFilePath();
} }
} }
......
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