Fix #474: Bad jvisualvm check

This commit is contained in:
Jan Dalheimer 2014-11-02 20:29:09 +01:00
parent add23a9a0b
commit 7d1dd2a32f

View File

@ -64,8 +64,7 @@ bool JVisualVMFactory::check(const QString &path, QString *error)
*error = QObject::tr("Empty path");
return false;
}
QString resolved = QStandardPaths::findExecutable(path);
if (resolved.isEmpty() && !QDir::isAbsolutePath(path))
if (!QDir::isAbsolutePath(path) || !QFileInfo(path).isExecutable() || !path.contains("visualvm"))
{
*error = QObject::tr("Invalid path to JVisualVM");
return false;