summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/update/FoldersTask.cpp
blob: 34e2292afd3d055d6576e0eabf10605c3c55f440 (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->minecraftRoot());
	if (!mcDir.exists() && !mcDir.mkpath("."))
	{
		emitFailed(tr("Failed to create folder for minecraft binaries."));
		return;
	}
	emitSucceeded();
}