diff options
Diffstat (limited to 'logic')
-rw-r--r-- | logic/MCEditTool.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/logic/MCEditTool.cpp b/logic/MCEditTool.cpp index 93ffb7a5..14dc1b96 100644 --- a/logic/MCEditTool.cpp +++ b/logic/MCEditTool.cpp @@ -23,8 +23,16 @@ void MCEditTool::runImpl() { return; } - const QString program = - QDir(mceditPath).absoluteFilePath("mcedit.py"); + QDir mceditDir(mceditPath); + QString program; + if (mceditDir.exists("mcedit.py")) + { + program = mceditDir.absoluteFilePath("mcedit.py"); + } + else if (mceditDir.exists("mcedit.exe")) + { + program = mceditDir.absoluteFilePath("mcedit.exe"); + } QProcess::startDetached(program, QStringList() << save, mceditPath); } @@ -53,7 +61,7 @@ bool MCEditFactory::check(const QString &path, QString *error) *error = QObject::tr("Path does not exist"); return false; } - if (!dir.exists("mcedit.py")) + if (!dir.exists("mcedit.py") && !dir.exists("mcedit.exe")) { *error = QObject::tr("Path does not contain mcedit.py"); return false; |