mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-12-27 12:15:26 +00:00
22 lines
437 B
C++
22 lines
437 B
C++
#include "FoldersTask.h"
|
|
#include "minecraft/MinecraftInstance.h"
|
|
#include <QDir>
|
|
|
|
FoldersTask::FoldersTask(MinecraftInstance * inst)
|
|
:Task()
|
|
{
|
|
m_inst = inst;
|
|
}
|
|
|
|
void FoldersTask::executeTask()
|
|
{
|
|
// Make directories
|
|
QDir mcDir(m_inst->gameRoot());
|
|
if (!mcDir.exists() && !mcDir.mkpath("."))
|
|
{
|
|
emitFailed(tr("Failed to create folder for minecraft binaries."));
|
|
return;
|
|
}
|
|
emitSucceeded();
|
|
}
|