Utils::Environment::searchInPath do not return directories

Task-Nr: QTCREATORBUG-3736
Reviewed-By: Friedemann Kleint
This commit is contained in:
dt
2011-02-09 13:31:40 +01:00
parent 04f991d7cd
commit b13ebc623c

View File

@@ -232,7 +232,7 @@ QString Environment::searchInPath(const QStringList &executables,
fp += slash;
fp += exec;
const QFileInfo fi(fp);
if (fi.exists())
if (fi.exists() && fi.isExecutable() && !fi.isDir())
return fi.absoluteFilePath();
}
}