From f115bdf5b89b2d3890102ad6b8acc3ba659ebe2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 6 Feb 2018 01:51:22 +0100 Subject: [PATCH] NOISSUE make visualvm work with relative paths (inside the MultiMC folder) --- api/logic/tools/JVisualVM.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/logic/tools/JVisualVM.cpp b/api/logic/tools/JVisualVM.cpp index 169967d9..8fdb594f 100644 --- a/api/logic/tools/JVisualVM.cpp +++ b/api/logic/tools/JVisualVM.cpp @@ -92,7 +92,8 @@ bool JVisualVMFactory::check(const QString &path, QString *error) *error = QObject::tr("Empty path"); return false; } - if (!QDir::isAbsolutePath(path) || !QFileInfo(path).isExecutable() || !path.contains("visualvm")) + QFileInfo finfo(path); + if (!finfo.isExecutable() || !finfo.fileName().contains("visualvm")) { *error = QObject::tr("Invalid path to JVisualVM"); return false;