summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/update/FoldersTask.cpp
blob: e2b1bb486fbee29b48b395cca957574f27e00ecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#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();
}