GH-977 possibly fix FTB on windows. Maybe. Partially.
This commit is contained in:
parent
29ce36c7bc
commit
81b37dae18
@ -282,8 +282,16 @@ void FTBPlugin::initialize(SettingsObjectPtr globalSettings)
|
|||||||
QString ftbDefault, newFtbDefault, oldFtbDefault;
|
QString ftbDefault, newFtbDefault, oldFtbDefault;
|
||||||
if (!GetEnvironmentVariableW(L"LOCALAPPDATA", newBuf, APPDATA_BUFFER_SIZE))
|
if (!GetEnvironmentVariableW(L"LOCALAPPDATA", newBuf, APPDATA_BUFFER_SIZE))
|
||||||
{
|
{
|
||||||
qCritical() << "Your LOCALAPPDATA folder is missing! If you are on windows, this means "
|
if(!GetEnvironmentVariableW(L"USERPROFILE", newBuf, APPDATA_BUFFER_SIZE))
|
||||||
"your system is broken.";
|
{
|
||||||
|
qCritical() << "Your LOCALAPPDATA folder is missing! If you are on windows, this means your system is broken.";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
auto userHome = QString::fromWCharArray(newBuf);
|
||||||
|
auto localAppData = PathCombine(QString::fromWCharArray(newBuf), "Local Settings", "Application Data");
|
||||||
|
newFtbDefault = QDir(localAppData).absoluteFilePath("ftblauncher");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user