summaryrefslogtreecommitdiffstats
path: root/logic/tools
diff options
context:
space:
mode:
authorJan Dalheimer <jan@dalheimer.de>2014-11-02 20:29:09 +0100
committerJan Dalheimer <jan@dalheimer.de>2014-11-02 20:29:09 +0100
commit7d1dd2a32f95eacaaea7d808cd07faf99e425977 (patch)
treed9d5d358efc7160571a3876780d921dc782c9830 /logic/tools
parentadd23a9a0b3be7d5b9b4a60db5e34e09d26d8940 (diff)
downloadMultiMC-7d1dd2a32f95eacaaea7d808cd07faf99e425977.tar
MultiMC-7d1dd2a32f95eacaaea7d808cd07faf99e425977.tar.gz
MultiMC-7d1dd2a32f95eacaaea7d808cd07faf99e425977.tar.lz
MultiMC-7d1dd2a32f95eacaaea7d808cd07faf99e425977.tar.xz
MultiMC-7d1dd2a32f95eacaaea7d808cd07faf99e425977.zip
Fix #474: Bad jvisualvm check
Diffstat (limited to 'logic/tools')
-rw-r--r--logic/tools/JVisualVM.cpp3
1 files changed, 1 insertions, 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;