From 7d1dd2a32f95eacaaea7d808cd07faf99e425977 Mon Sep 17 00:00:00 2001 From: Jan Dalheimer Date: Sun, 2 Nov 2014 20:29:09 +0100 Subject: [PATCH] Fix #474: Bad jvisualvm check --- logic/tools/JVisualVM.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/logic/tools/JVisualVM.cpp b/logic/tools/JVisualVM.cpp index 33e271b4..f47294d7 100644 --- a/logic/tools/JVisualVM.cpp +++ b/logic/tools/JVisualVM.cpp @@ -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;