NOISSUE make visualvm work with relative paths (inside the MultiMC folder)

This commit is contained in:
Petr Mrázek 2018-02-06 01:51:22 +01:00
parent 41aef8414a
commit f115bdf5b8

View File

@ -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;