diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-02-06 01:51:22 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-02-06 01:51:22 +0100 |
commit | f115bdf5b89b2d3890102ad6b8acc3ba659ebe2b (patch) | |
tree | e3dcf239626eca3e087d656c505c110dc7225703 /api | |
parent | 41aef8414a0c01883a431c0353369ba1651b5cd9 (diff) | |
download | MultiMC-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.cpp | 3 |
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; |