Fix FTB?
This commit is contained in:
parent
b911a3834c
commit
e17364de6b
11
MultiMC.cpp
11
MultiMC.cpp
@ -371,10 +371,10 @@ void MultiMC::initGlobalSettings()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QLOG_DEBUG() << "New FTB path from environment variable:" << QString::fromWCharArray(newBuf);
|
newFtbDefault = QDir(QString::fromWCharArray(newBuf)).absoluteFilePath("ftblauncher");
|
||||||
newFtbDefault = PathCombine(QString::fromWCharArray(newBuf), "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))
|
if (!GetEnvironmentVariableW(L"APPDATA", buf, APPDATA_BUFFER_SIZE))
|
||||||
{
|
{
|
||||||
@ -382,8 +382,9 @@ void MultiMC::initGlobalSettings()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
oldFtbDefault = PathCombine(QString::fromWCharArray(buf), "ftblauncher");
|
oldFtbDefault = QDir(QString::fromWCharArray(buf)).absoluteFilePath("ftblauncher");
|
||||||
if (QFile::exists(PathCombine(oldFtbDefault, "ftblaunch.cfg")))
|
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";
|
QLOG_INFO() << "Using old FTB path";
|
||||||
ftbDefault = oldFtbDefault;
|
ftbDefault = oldFtbDefault;
|
||||||
|
Loading…
Reference in New Issue
Block a user