GH-1275 create server-resource-packs folder on launch

This is a workaround for Minecraft bug MCL-3732
This commit is contained in:
Petr Mrázek 2015-10-12 17:55:10 +02:00
parent d5aee5fd23
commit 432e812da1

View File

@ -31,6 +31,12 @@ void LaunchMinecraft::executeTask()
std::shared_ptr<MinecraftInstance> minecraftInstance = std::dynamic_pointer_cast<MinecraftInstance>(instance); std::shared_ptr<MinecraftInstance> minecraftInstance = std::dynamic_pointer_cast<MinecraftInstance>(instance);
QStringList args = minecraftInstance->javaArguments(); QStringList args = minecraftInstance->javaArguments();
// HACK: this is a workaround for MCL-3732 - 'server-resource-packs' is created.
if(!FS::ensureFolderPathExists(FS::PathCombine(minecraftInstance->minecraftRoot(), "server-resource-packs")))
{
emit logLine(tr("Couldn't create the 'server-resource-packs' folder"), MessageLevel::Error);
}
QString allArgs = args.join(", "); QString allArgs = args.join(", ");
emit logLine("Java Arguments:\n[" + m_parent->censorPrivateInfo(allArgs) + "]\n\n", MessageLevel::MultiMC); emit logLine("Java Arguments:\n[" + m_parent->censorPrivateInfo(allArgs) + "]\n\n", MessageLevel::MultiMC);