summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2018-02-06 01:51:22 +0100
committerPetr Mrázek <peterix@gmail.com>2018-02-06 01:51:22 +0100
commitf115bdf5b89b2d3890102ad6b8acc3ba659ebe2b (patch)
treee3dcf239626eca3e087d656c505c110dc7225703 /api
parent41aef8414a0c01883a431c0353369ba1651b5cd9 (diff)
downloadMultiMC-f115bdf5b89b2d3890102ad6b8acc3ba659ebe2b.tar
MultiMC-f115bdf5b89b2d3890102ad6b8acc3ba659ebe2b.tar.gz
MultiMC-f115bdf5b89b2d3890102ad6b8acc3ba659ebe2b.tar.lz
MultiMC-f115bdf5b89b2d3890102ad6b8acc3ba659ebe2b.tar.xz
MultiMC-f115bdf5b89b2d3890102ad6b8acc3ba659ebe2b.zip
NOISSUE make visualvm work with relative paths (inside the MultiMC folder)
Diffstat (limited to 'api')
-rw-r--r--api/logic/tools/JVisualVM.cpp3
1 files changed, 2 insertions, 1 deletions
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;