chore: reformat

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu
2023-08-02 18:35:35 +02:00
parent ce2ca13815
commit 1d468ac35a
594 changed files with 16040 additions and 16536 deletions

View File

@ -1,27 +1,23 @@
#include "CreateGameFolders.h"
#include "minecraft/MinecraftInstance.h"
#include "launch/LaunchTask.h"
#include "FileSystem.h"
#include "launch/LaunchTask.h"
#include "minecraft/MinecraftInstance.h"
CreateGameFolders::CreateGameFolders(LaunchTask* parent): LaunchStep(parent)
{
}
CreateGameFolders::CreateGameFolders(LaunchTask* parent) : LaunchStep(parent) {}
void CreateGameFolders::executeTask()
{
auto instance = m_parent->instance();
std::shared_ptr<MinecraftInstance> minecraftInstance = std::dynamic_pointer_cast<MinecraftInstance>(instance);
if(!FS::ensureFolderPathExists(minecraftInstance->gameRoot()))
{
if (!FS::ensureFolderPathExists(minecraftInstance->gameRoot())) {
emit logLine("Couldn't create the main game folder", MessageLevel::Error);
emitFailed(tr("Couldn't create the main game folder"));
return;
}
// HACK: this is a workaround for MCL-3732 - 'server-resource-packs' folder is created.
if(!FS::ensureFolderPathExists(FS::PathCombine(minecraftInstance->gameRoot(), "server-resource-packs")))
{
if (!FS::ensureFolderPathExists(FS::PathCombine(minecraftInstance->gameRoot(), "server-resource-packs"))) {
emit logLine("Couldn't create the 'server-resource-packs' folder", MessageLevel::Error);
}
emitSucceeded();