From e17364de6bcb838afc4a9e983cc175f9a66d9d9a Mon Sep 17 00:00:00 2001 From: Jan Dalheimer Date: Fri, 23 May 2014 16:39:14 +0200 Subject: Fix FTB? --- MultiMC.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'MultiMC.cpp') diff --git a/MultiMC.cpp b/MultiMC.cpp index 84be1d88..82b0e207 100644 --- a/MultiMC.cpp +++ b/MultiMC.cpp @@ -371,10 +371,10 @@ void MultiMC::initGlobalSettings() } else { - QLOG_DEBUG() << "New FTB path from environment variable:" << QString::fromWCharArray(newBuf); - newFtbDefault = PathCombine(QString::fromWCharArray(newBuf), "ftblauncher"); + newFtbDefault = QDir(QString::fromWCharArray(newBuf)).absoluteFilePath("ftblauncher"); + QLOG_DEBUG() << "New FTB path from environment variable:" << QString::fromWCharArray(newBuf) << newFtbDefault; } - if (!QFile::exists(PathCombine(newFtbDefault, "ftblaunch.cfg"))) + if (!QFile::exists(QDir(newFtbDefault).absoluteFilePath("ftblaunch.cfg"))) { if (!GetEnvironmentVariableW(L"APPDATA", buf, APPDATA_BUFFER_SIZE)) { @@ -382,8 +382,9 @@ void MultiMC::initGlobalSettings() } else { - oldFtbDefault = PathCombine(QString::fromWCharArray(buf), "ftblauncher"); - if (QFile::exists(PathCombine(oldFtbDefault, "ftblaunch.cfg"))) + oldFtbDefault = QDir(QString::fromWCharArray(buf)).absoluteFilePath("ftblauncher"); + QLOG_DEBUG() << "Old FTB path from environment variable" << QString::fromWCharArray(buf) << oldFtbDefault; + if (QFile::exists(QDir(oldFtbDefault).absoluteFilePath("ftblaunch.cfg"))) { QLOG_INFO() << "Using old FTB path"; ftbDefault = oldFtbDefault; -- cgit v1.2.3