summaryrefslogtreecommitdiffstats
path: root/MultiMC.cpp
diff options
context:
space:
mode:
authorJan Dalheimer <jan@dalheimer.de>2014-05-23 16:39:14 +0200
committerJan Dalheimer <jan@dalheimer.de>2014-05-23 16:39:14 +0200
commite17364de6bcb838afc4a9e983cc175f9a66d9d9a (patch)
tree9b3e3fed24a2d8080f919d68ed2916c7fe5e936a /MultiMC.cpp
parentb911a3834cad192b53092dbaa3eb02c1a2af59e3 (diff)
downloadMultiMC-e17364de6bcb838afc4a9e983cc175f9a66d9d9a.tar
MultiMC-e17364de6bcb838afc4a9e983cc175f9a66d9d9a.tar.gz
MultiMC-e17364de6bcb838afc4a9e983cc175f9a66d9d9a.tar.lz
MultiMC-e17364de6bcb838afc4a9e983cc175f9a66d9d9a.tar.xz
MultiMC-e17364de6bcb838afc4a9e983cc175f9a66d9d9a.zip
Fix FTB?
Diffstat (limited to 'MultiMC.cpp')
-rw-r--r--MultiMC.cpp11
1 files changed, 6 insertions, 5 deletions
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;